Reputation: 11982
I'm attempting to install a node module that has specified a peerDependencies
to an older version of a package. I know that module will work with the newer version. How can I tell npm to ignore the peerinvalid
error? Currently the peerinvalid
error is stoping the installation process.
This is the error:
npm ERR! peerinvalid Peer [email protected] wants [email protected]
Thanks!
Upvotes: 5
Views: 1784
Reputation: 11982
In NPM v3 peer dependancies show a warning instead of an error.
We will also be changing the behavior of peerDependencies in npm@3. We won’t be automatically downloading the peer dependency anymore. Instead, we’ll warn you if the peer dependency isn’t already installed. This requires you to resolve peerDependency conflicts yourself, manually, but in the long run this should make it less likely that you’ll end up in a tricky spot with your packages’ dependencies.
http://blog.npmjs.org/post/110924823920/npm-weekly-5
Upvotes: 0
Reputation: 4773
A really hacky/temporary workaround is to modify the package.json of the installed packages with the peerDependency specified, deleting the lines that specify react as a peerDependency.
This hack will go away if you (or a colleague) need to npm install
your package's requirements from scratch. Like I said, a crappy temporary workaround.
Upvotes: 1