fadfad
fadfad

Reputation: 369

Solving peer dependency issue in NPM

I'm having trouble figuring out how exactly to satisfy the peer dependencies for different npm packages at the minute when I run npm install. This is the error message I appear to getting.

npm ERR! peerinvalid The package [email protected] does not satisfy 
its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants eslint@^2.4.0
npm ERR! peerinvalid Peer [email protected] wants eslint@^2.0.0
npm ERR! peerinvalid Peer [email protected] wants [email protected]
npm ERR! peerinvalid Peer [email protected] wants eslint@<2.3.0

I have failed in a few attempts and cannot understand how to get to the solution here.

Upvotes: 2

Views: 916

Answers (1)

janit.brail
janit.brail

Reputation: 37

You probably have [email protected] installed globally ?

Try uninstall -g it, and run npm install again

Also look here

Looks like some versions had their wires crossed somehow. Ended up removing my node_modules directory rm -r node_modules and reinstalling npm install and that fixed it.

npm dependency issue when installing... well, pretty much anything


The error messages don't have to be related to the package you're trying to install. That means, if you want to install e.g. kss the error doesn't mean there is a problem with kss.

Ok, so what? Check the additional messages prompted during the installation attempt and find the packages that cause the problem. The sections look like

npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.0

https://futurestud.io/blog/how-to-fix-npm-package-does-not-satisfy-its-siblings-peerdependencies-requirements

Their solution is to either update or uninstall the modules.

Upvotes: 3

Related Questions