0
votes

NPM is throwing errors when i try to install any app. The errors are as below -


npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ember-cli"
npm ERR! node v4.0.0
npm ERR! npm  v2.14.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 grunt-contrib-clean@~0.5.0

Any help will be highly appreciated.

Thanks, Shaz

2
by saying "I try to install any app", you mean by installing any package I assume? - jusopi
Yes you are absolutely right.. in fact in my post above I was trying to install the Ember Cli package but could not and similarly same is the case with other npm packages.. I am not able to install them - Shahsayyad
Try to read this stackoverflow.com/questions/11920571/… I hope it can help you. - user3707579

2 Answers

0
votes

It sounds like you may have gotten yourself into the situation described in this issue. And, that is that an invalid module was linked with the npm link command.

After reading through there, the solution that I would try is one of the ones provided by Github user, sam-github. And, that solution is to uninstall everything that you have globally installed with npm and then try to only reinstall what is necessary.

To discover what is installed globally by npm, you can use this command: npm ls -g

And then, to uninstall a module that is installed globally use this command: npm uninstall <module-name> -g

On the other hand, if you have never used the npm link command, then this may not solve your problem.

-1
votes

One of the reason for getting this error is your node version is not a stable one, try using a stable node version,

Use NVM to install multiple versions of node and switch between them and test your app.