nodejs npm安装不了 设置代理
nodejs npm安装不了 设置代理
C:\Users\heroyan>npm install less npm http GET https://registry.npmjs.org/less npm http GET https://registry.npmjs.org/less npm http GET https://registry.npmjs.org/less npm ERR! Error: connect ETIMEDOUT npm ERR! at errnoException (net.js:768:11) npm ERR! at Object.afterConnect [as oncomplete] (net.js:759:19) npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com> npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Fi ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "less" npm ERR! cwd C:\Users\heroyan npm ERR! node -v v0.8.8 npm ERR! npm -v 1.1.59 npm ERR! syscall connect npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\Users\heroyan\npm-debug.log npm ERR! not ok code 0
原来是代理的问题,电脑通过代理上网,所以设置下代理就可以了,运行命令
npm config set proxy=http://web-proxy.oa.com:8080
浙公网安备 33010602011771号