Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "npm ERR! code EPEERINVALID" on npm packages global install

Whenever I am installing any global package I am getting this error.

Error:- on npm packages global install

For example:-

robins@robins-H61MLV3:~$ sudo npm install -g jshint

/usr/bin/jshint -> /usr/lib/node_modules/jshint/bin/jshint
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "jshint"
npm ERR! node v0.10.25
npm ERR! npm  v2.13.2
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants karma@~0.10.0
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.12.8
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9

What I have tried so far

I have tried updating the global karma and its related modules but it didn't worked. I have also tried uninstalling karma modules but the problem persists.

sudo npm uninstall -g  karma grunt-karma karma-html2js-preprocessor  karma-mocha karma-phantomjs-launcher karma-script-launcher  karma-jasmine  karma-requirejs karma-coffee-preprocessor
like image 218
Robins Gupta Avatar asked Nov 20 '15 00:11

Robins Gupta


1 Answers

It looks like karma has some dependencies on other modules that are available (global), but are older. You'd need to update your global packages using npm update -g

npm update -g

Basically "npm update -g" just updates all Global packages. "All" because no package name has been provided and "global" because of the "-g" switch.

My suggestion is to first update all of your global packages and then try installing jshint again.

sudo npm install -g jshint
like image 186
Don Avatar answered Sep 20 '22 05:09

Don