在公司的网络中npm一直install不了
[plain] view plain copy
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 set proxy=http://proxy-szn
网友评论