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

Does anyone get this error? I have had this problem for a while now and I’m not sure how to resolve it: ``` ╰─ sudo npm install -g @sanity/cli Password: /usr/local/bin/sanity...

2 replies
Last updated: Jan 13, 2021
Does anyone get this error? I have had this problem for a while now and I’m not sure how to resolve it:


╰─ sudo npm install -g @sanity/cli
Password:
  /usr/local/bin/sanity -> /usr/local/lib/node_modules/@sanity/cli/bin/sanity
+ @sanity/cli@2.1.4
updated 1 package in 0.774s


╭─────────────────────────────────────────────────────────────────╮
│                                                                 │
│      New patch version of npm available! 6.14.8 → 6.14.11       │
│   Changelog: <https://github.com/npm/cli/releases/tag/v6.14.11>   │
│                Run npm install -g npm to update!                │
│                                                                 │
╰─────────────────────────────────────────────────────────────────╯

╭─ (anaconda3)  ~/dev/<removed>/cms   master ● ⍟4                                                                            ✔  4788  10:16:08
╰─ sanity upgrade
@sanity/core not installed in current project
Project-specific commands not available until you run `sanity install`
⠙ Resolving dependencies^C
╭─ (anaconda3)  ~/dev/<removed>/cms   master ● ⍟4                                                                  SIGINT(2) ↵  4789  10:16:25
╰─ sanity install

✔ Saved lockfile
✖ Resolving dependencies
✖ Command failed with exit code 1.
✖ Resolving dependencies

Error: Command failed :(
  at /usr/local/lib/node_modules/@sanity/cli/bin/sanity-cli.js:3260:2554

Jan 13, 2021, 9:21 AM
Ok, I feel silly now. After I deleted the folders
node_modules
,
dist
and the file
package-lock.json
the install command worked without problems.
Jan 13, 2021, 9:28 AM
Thanks for sharing the solution, Thomas 🙌 Glad you could fix it that way!
Jan 13, 2021, 9:35 AM

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?