Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Error installing Sanity through npm on terminal, authentication issue

10 replies
Last updated: Feb 23, 2023
👋 Hello, team!
I'm new to sanity and am having error installing sanity through npm on my terminal
Feb 22, 2023, 12:33 AM
Hello and welcome!!!
What’s the error you are running into?
Feb 22, 2023, 12:38 AM
This is the error


? Login type GitHub

Opening browser at
https://api.sanity.io/v1/auth/login/github?type=listen&uuid=a912a197d93723af3be6e3f554f62a79&source=cli&label=octseven+%2F+win32
â ‹ Waiting for browser login to complete... Press Ctrl + C to cancelnode
:events:491 throw er; // Unhandled 'error' event
^

Error: spawn undefined\System32\WindowsPowerShell\v1.0\powershell ENOENT
at ChildProcess._handle.onexit (node
:internal/child_process:283:19) at onErrorNT (node
:internal/child_process:476:16)PS C:\Users\hp\Desktop\Sanity\backend> npm create sanity@latest -- --template clean --create-project "Sanity Project" --dataset production
You're setting up a new project!
We'll make sure you have an account with
Sanity.io . Then we'llinstall an open-source JS content editor that connects to
the real-time hosted API on
Sanity.io . Hang on.
Press ctrl + C at any time to quit.

Prefer web interfaces to terminals?
You can also set up best practice Sanity projects with
your favorite frontends on
https://www.sanity.io/templates
We can't find any auth credentials in your Sanity config
- log in or create a new account
Feb 22, 2023, 12:48 AM
Thanks for sending that over.

I think it’s regarding this:
We can’t find any auth credentials in your Sanity config
- log in or create a new account
It looks like you need to setup your Sanity CLI and setup a sanity account at
Sanity.io

Docs:
https://www.sanity.io/docs/getting-started-with-sanity-cli
Feb 22, 2023, 3:12 AM
I'm also having trouble with this for hours. I read that it was a windows path error and been trying still can't seem to fix it, I tried following the instructions someone said in a previous thread about this error
Feb 22, 2023, 4:07 AM
Isn't working have setup my sanity account and still not working
Feb 22, 2023, 12:23 PM
same here, I keep changing the path directory in the environment variables and have added so many paths and no luck still
Feb 22, 2023, 12:53 PM
Have you tried this solution?
Feb 22, 2023, 5:58 PM
I installed git on windows and tried running it but still have problems. I was able to login to sanity through Linux terminal though
Feb 22, 2023, 5:59 PM
Still having problem
Feb 22, 2023, 7:24 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?