Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve peerinvalid errors in npm install?

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?

like image 414
slacktracer Avatar asked May 21 '14 23:05

slacktracer


People also ask

Why NPM install is showing error?

The npm ERR! code 1 error usually occurs when you run the npm install command. This cause of this error is that one of the dependencies you define in your package. json file fails to be installed properly on your computer.


2 Answers

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.

like image 53
mscdex Avatar answered Oct 03 '22 19:10

mscdex


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",
like image 35
Matthias M Avatar answered Oct 03 '22 18:10

Matthias M