Jump to content

Base template `npm run start:auth` error

Go to solution Solved by s-g-k,

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 8
  • Created
  • Last Reply

Top Posters In This Topic

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

Edited by humxahafeex
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
  • 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
  • 2 years later...

Thanks for the input! I have a similar issue with the base template, so here’s hoping these tips will help.
I have to adjust the automation tools used in our business. I’ve already run an automation tool for api testing to help me determine any possible issues with the software.
I will try using the same code samples and will post an update on the results. This is the first time I have encountered an issue like this, so I was pretty lost in terms of workarounds.

Edited by Briant9tT
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

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