Search code examples
node.jsgoogle-apps-scriptclasp

Google Apps Script - clasp - failed to create script


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


Solution

  • 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.