1

On an little outdated npm/node-platform I'm getting this error while trying to install grunt.

npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-bake@0.2.1 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-copy@0.4.1 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-clean@0.5.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-sass@0.8.1 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-http-server@1.1.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-watch@0.6.1 wants grunt@~0.4.0

npm ERR! System Linux 4.9.25
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "grunt"
npm ERR! cwd /some_workpath/workspace/1.1_build/src/main/grunt
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! code EPEERINVALID

The issue: I have no clue what's npm trying to tell me.

frlan
  • 563
  • 5
  • 27

1 Answers1

0

What is happening

According to this article on the nodejs blog, EPEERINVALID means that a certain dependency — let's say grunt, has plugins. These plugins also depend on grunt, but the version of grunt you are trying to install is not compatible with the version of grunt that the plugins want. Usually if you are installing through a package.json, this is not a problem, but if you are running npm install grunt in the same directory as where those plugins are installed, they will fail because you are trying to install a newer version of grunt that may not be supported.

Solutions

At this point you have a few solutions you could use:

Install the version in package.json

Run npm install in the same directory as the project that has those dependencies.

Install a specific, compatible version of grunt

Run npm install grunt@0.4.0 instead of npm install grunt

Update (or remove) the conflicting plugins

Observe the packages in the output of the command, then update them using npm update or npm uninstall

Logan
  • 66
  • 5