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.
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 npx
— npx sanity start
—until the global package installation is resolved. You may also want to try running npm uninstall -g @sanity/cli
and reinstalling it.
我卸载然后让它开始工作,但是当我运行npm list -g
@sanity/cli
时找不到,如果我再次运行npx sanity start
它说zsh: command not found:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.