✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

Resolving NPM 7+ Peer Dependency Issues

4 replies
Last updated: Jan 25, 2023
Hello everyone!
Someone please help me to resolve this problem, I am getting this type of error when installing any package. I tried to install
styled-components
I got this error on stack-overflow I saw some people saying just lower the react version then the error will resolved but It didn't resolve my problem. So I uninstalled and used CSS3 for styling. But Now I want to add icons and I am using
react-icons
library again it is showing same type of error.
Thanks In Advance!
Jan 25, 2023, 10:14 PM
That looks like an NPM 7+, peer dependency-related issue. If you’re running NPM 7 or greater, then you could try
npm install --legacy-peer-deps
. See: https://stackoverflow.com/questions/66239691/what-does-npm-install-legacy-peer-deps-do-exactly-when-is-it-recommended-wh
Jan 25, 2023, 10:53 PM
Ideally though, all of the NPM packages that you’re installing should update themselves to be more compatible with the current peer dependency resolution algorithm.
Jan 25, 2023, 10:54 PM
Is anything actually broken in your app? These are just warnings, not errors, so you may be safe to ignore them, although I’d do some thorough testing and investigating first. These errors will hopefully go away as the various package authors publish newer versions.
Jan 25, 2023, 10:55 PM
Thanks
user F
🙏, It was helpful.
Jan 25, 2023, 11:22 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?