Gmcintosh
Gmcintosh

Reputation: 41

zsh: command not found: sanity

Hi I have installed the Sanity CLI using:

npm install -g @sanity/cli

However when I try sanity init, I get:

zsh: command not found: sanity

it does work when I use:

npx @sanity/cli init

However when I try to use sanity start I get the command not found again.

Upvotes: 0

Views: 1197

Answers (2)

UnITrack
UnITrack

Reputation: 1

I uninstalled then got it to start working but when I ran npm list -g @sanity/cli wasn't found and if I run the npx sanity start again it says zsh: command not found:

Upvotes: 0

Geoff Ball
Geoff Ball

Reputation: 773

As Tushar mentioned, give npm list -g --depth 0 a try and ensure @sanity/cli appears. To get your project going, you can continue to prefix commands with npxnpx sanity start—until the global package installation is resolved. You may also want to try running npm uninstall -g @sanity/cli and reinstalling it.

Upvotes: 2

Related Questions