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




  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值