Error installing Sanity into project, resolved by clearing npm cache and using --legacy-peer-deps flag.

2 replies
Last updated: Apr 10, 2024
Hi there everyone! Battling to install Sanity into my project. This is the error that I am getting at the moment:
Error: Command failed with exit code 1 (EPERM): npm install --legacy-peer-deps --save @sanity/vision@3 sanity@3 @sanity/image-url@1 styled-components@6

I don’t know if anyone has run into this command but I would really appreciate any advice - huge blocker for me at the moment
😆
Apr 8, 2024, 9:12 PM
nvm cleared my npm’s cache and reran the install and it worked
Apr 8, 2024, 9:18 PM
yeah, you really need that --legacy-peer-deps, else it fails as too many legacy dependencies
Apr 10, 2024, 3:49 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?