简体   繁体   中英

Error: npm doesn't work with node v0.10.32 in netbeans 8.1

在此处输入图片说明

Hi, I'm trying to install npm in netbeans. I've got the following output when I click on 'resolve project problems'

"C:\npm-1.1.0-1\npm.cmd" "install"
Error: npm doesn't work with node v0.10.32
Required: node@0.6 || 0.7 || 0.8
at C:\npm-1.1.0-1\node_modules\npm\bin\npm-cli.js:60:23
at Object.<anonymous> (C:\npm-1.1.0-1\node_modules\npm\bin\npm-cli.js:80:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

Done.

How can I fix this?

I came across http://abdelraoof.com/blog/2014/11/11/install-nodejs-without-admin-rights/ . In the notes at the bottom Constantino added :

1 - extracted npm-3.5.2.zip
2 - created a node_modules directory in the same directory where node.exe is
3 - renamed the extracted directory from npm-3.5.2 to npm
4 - moved npm directory to node_modules
5 - copied npm.cmd (because I am using Windows) to the same directory where node.exe is

At the end I only needed to add one entry in the classpath.

This worked for me on win 7. I hope this will help someone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM