Jump to content

Base template `npm run start:auth` error

Recommended Posts

Hello,

I'm trying to "get started" with the base template as per instructions on https://developers.squarespace.com/get-started

After installing the dependencies and the local dev server I try to run:

npm run start:auth

I am not able to log in via the command line. It seems to be the command `squarespace setup` that is failing.

The script is POSTing a login request to https://www.squarespace.com/api/auth/Login?crumb=undefined

But the resource is returning a 404 which means I cannot log in.

Is this a known error? It seems to be a problem with the Auth API and not the base template or the scripts there.

Any help or pointers would be greatly appreciated.

Screenshot 2020-03-17 at 21.33.11.png

Link to comment
  • Replies 6
  • Views 1.8k
  • Created
  • Last Reply
23 minutes ago, s-g-k said:

Hello,

I'm trying to "get started" with the base template as per instructions on https://developers.squarespace.com/get-started

After installing the dependencies and the local dev server I try to run:


npm run start:auth

I am not able to log in via the command line. It seems to be the command `squarespace setup` that is failing.

The script is POSTing a login request to https://www.squarespace.com/api/auth/Login?crumb=undefined

But the resource is returning a 404 which means I cannot log in.

Is this a known error? It seems to be a problem with the Auth API and not the base template or the scripts there.

Any help or pointers would be greatly appreciated.

Screenshot 2020-03-17 at 21.33.11.png

Hi @s-g-k I just Tried and it worked perfectly fine 🙂 with out any Issue , Would you mind Starting the process again also try to update your npm to latest version possible 🙂 Also Most Important , Run terminal as admin(windows) , and on mac using ($ sudo).

Hope it helps 🙂

no-issue.PNG

Link to comment

Thanks for your reply. I do get to the same stage as you, but it is when I choose "Use an existing website" or "Create a new website" and I try to log in, that I get the error.

It is the login http POST request that fails. Not the package as fas as I can see.

Link to comment

It seems like the base template repository on github is outdated @SQUARESPACE. It would be nice if this was updated!

Reinstalling the @squarespace/toolbelt package allowed me to log in.

`npm uninstall @squarespace/toolbelt`

`npm install --save-dev @squarespace/toolbelt`

 

Link to comment
  • 4 months later...

I have followed the attempts above, and I am also receiving a 404 error in the JSON response running squarespace-server with auth option and as sudo user (which is never a good option in dev running node dependencies please do not suggest this, Squarespace support). A 404 error is coming from the Squarespace server response. This means your API or possibly your squarespace-server script is referencing a missing API endpoint. Looking at the response, it appears this happens here:

https://www.squarespace.com/api/auth/Login?crumb=undefined 

This can be verified using any API testing tool. Is there a new/different endpoint?

 

Link to comment

I managed to resolve some major issues by hard coding in a higher version of @squarespace/toolbelt and @squarespace/server in my package.json. 

    "@squarespace/toolbelt": "^0.10.3",
    "@squarespace/server": "^1.7.0",

This, at least allowed me to run the basic npm commands without 404 errors. It looks like they updated the referenced endpoints in later versions of the toolbelt, but neglected to update any of the dev dependencies in any of their base templates or in wright framework. 

However, now I'm loading my template on localhost:9000 and zero changes I make locally are reflected despite seeing the code build in the build directory. Did the staff member contributing to this local dev project leave?  Following all instructions in the developer portal required me to spend hours troubleshooting after the fact. Documentation needs to be updated on the public facing developer portal.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.