1
votes

Following THIS tutorial on codelabs.developers.google.com:

When I run this command clasp create "clasp Codelab" to create a standalone script I get the message:

Please login. (clasp login)

Though I have already run the command login before that which opens the browser with the pop showing:

clasp – The Apps Script CLI wants to access your Google Account

ALLOW

On selecting ALLOW, I get

Logged in! You may close this page.

I can not figure out what I am missing here. Any help would be appreciated.

EDIT 1: I am using Windows 10 (64 BIT). Node.js version 8.11.1

1
On macOS, completing the authentication flow should create the file ~/.clasprc.json. Was that created, and do you access token, token type, and refresh token inside the file?Diego
I am sorry I should have mentioned, I am using windows 10.Urvah Shabbir
Hm... Please try to login > clasp login --no-localhost Perhaps your firewall is blocking the clasp local server or its port.contributorpw
Perfect! Can you post this as an answer so I can mark it as correct?Urvah Shabbir

1 Answers

1
votes

I believe the answer here is to login first:

clasp login --no-localhost

As mentioned in the comment.


On a different note, I updated the codelab to state:

clasp create --title "clasp Codelab"

Since the --title change was a breaking change in the early days of clasp.