Recently I was reinstalling ionic and cordova with:
npm install -g cordova ionic
but I got the following error:
E:\IonicTesting>npm install -g cordova ionic npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"}) npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.7","npm":"2.11.3"}) npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"}) npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"}) npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.7","npm":"2.11.3"}) npm WARN installMany normalize-package-data was bundled with [email protected], but bundled package wasn't found in unpacked tre e C:\Users\Nikola\AppData\Roaming\npm\cordova -> C:\Users\Nikola\AppData\Roaming\npm\node_modules\cordova\bin\cordova npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"}) npm WARN installMany normalize-package-data was bundled with [email protected], but bundled package wasn't found in unpacked tre e C:\Users\Nikola\AppData\Roaming\npm\ionic -> C:\Users\Nikola\AppData\Roaming\npm\node_modules\ionic\bin\ionic npm WARN unmet dependency C:\Users\Nikola\AppData\Roaming\npm\node_modules\generator-ionic requires cordova@'^4.2.0' but will load npm WARN unmet dependency C:\Users\Nikola\AppData\Roaming\npm\node_modules\cordova, npm WARN unmet dependency which is version 5.1.1 npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\NodeJS\\\\node.exe" "C:\\NodeJS\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" "ionic" npm ERR! node v0.12.7 npm ERR! npm v2.11.3 npm ERR! code EPEERINVALID npm ERR! peerinvalid The package node-inspector does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer [email protected] wants node-inspector@~0.7.0 npm ERR! Please include the following file with any support request: npm ERR! E:\IonicTesting\npm-debug.log
At first I thought the reason is that I may have had an older version of node or npm but wasn’t the case because my versions were up to date (date of this post: 03.08.2015):
E:\IonicTesting>node -v v0.12.7
E:\IonicTesting>npm -v 2.11.3
Also, I did try:
npm update -g
and
npm cache clean
as noted in the few StackOverflow answers, but it didn’t help. After a bit of googling and messing around I realized (an idea came from this StackOverflow answer) that I could try uninstalling the dependencies which were messing with me:
npm uninstall -g node-inspector npm uninstall -g strong-cli npm install -g generator-karma
After this I ran
npm update -g
and then, to finally install Ionic and Cordova, I ran:
npm install -g cordova ionic
And, what do you know – it worked. Hope this helps someone!