Reputation: 87
Whenever I try to import a project in node.js, I can't seem to get it to work. It gives error's when I try to install. I've tried using cmd, cmd as admin, cmd for node and git bash. They all give the same error and I can't seem to figure out what it means.
This is an example of the output I get when i use "npm install express -g"
c:\wamp\www\3imda\webtech2\eindopdracht>npm install express -g npm WARN unmet dependency C:\Users\Maïteh\AppData\Roaming\npm\node_modules\phone gap\node_modules\phonegap-build requires colors@'0.6.x' but will load npm WARN unmet dependency C:\Users\Maïteh\AppData\Roaming\npm\node_modules\phone gap\node_modules\colors, npm WARN unmet dependency which is version 0.6.0-1 npm WARN unmet dependency C:\Users\Maïteh\AppData\Roaming\npm\node_modules\phone gap\node_modules\prompt\node_modules\winston requires colors@'0.x.x' but will lo ad npm WARN unmet dependency C:\Users\Maïteh\AppData\Roaming\npm\node_modules\phone gap\node_modules\colors, npm WARN unmet dependency which is version 0.6.0-1 npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs \node_modules\npm\bin\npm-cli.js" "install" "express" "-g" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package mongoose does not satisfy its siblings' peerDep endencies requirements! npm ERR! peerinvalid Peer [email protected] wants mongoose@~3
npm ERR! Please include the following file with any support request: npm ERR! c:\wamp\www\3imda\webtech2\eindopdracht\npm-debug.log
c:\wamp\www\3imda\webtech2\eindopdracht>
I get the same error when i try "npm install -g"
Upvotes: 1
Views: 1637
Reputation: 1785
From this screenshot, you can see that node-restful
expects a mongoose of version ~3, but from this screenshot, you can see that you have version 4.0.1
of mongoose! The immediate solution is to change the version of mongoose in the package.json
file to 3.9.7
and re-run npm install
(without the -g
). This is what worked for me locally.
You can read more about Peer Dependencies, should you like to know why this was happening.
Cheers, Brennan
Upvotes: 2