How to solve peerinvalid errors in npm install?

15.2k Views Asked by At

I'm trying to follow the steps to contribute to PhysicsJS (https://github.com/wellcaffeinated/PhysicsJS#contributing) and having the following error during npm install.

npm ERR! peerinvalid The package grunt-contrib-jasmine does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants grunt-contrib-jasmine@~0.5.3
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/slacktracer/Dropbox/dev/PhysicsJS
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/slacktracer/Dropbox/dev/PhysicsJS/npm-debug.log
npm ERR! not ok code 0

Any suggestions on how to solve it?

2

There are 2 best solutions below

0
On BEST ANSWER

It looks like PhysicsJS's package.json needs to be updated so that "grunt-contrib-jasmine": "0.4.x", is "grunt-contrib-jasmine": "0.5.x", in the devDependencies.

0
On

In my case (peerinvalid problem, but different modules) I had to uninstall the module first and then install it again:

npm uninstall MODULE
npm install MODULE

I also specified a fixed version for the MODULE in the package.json because before I had a version range:

"MODULE": "1.42.2",