简体   繁体   中英

npm throws error for wrong package

Previously, I tried installing the package react-bootstrap , but since it wasn't compatible with my version of react I gave up.

However, now I get the following error when running npm install for any package:

npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package react does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-bootstrap@0.27.1 wants react@>=0.14.0

This happens even though react-bootstrap is not actually installed. It is NOT listed in package.json . In this file I only specify the version of react:

react": "~0.13.3"

How can I get rid of this error?

Uninstall react-bootstrap then install its latest version working with react v0.13.x

npm uninstall react-bootstrap
npm install react-bootstrap@0.26.4 --save

I just needed to delete the node_modules file containing all npm packages. Then, I had to run npm install

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM