清理
npm config delete http-proxy
npm config delete https-proxy
具体设置步骤如下:
1. 执行
2. 执行
3. 编辑"C:\\Users\\USER_NAME\\.npmrc",
如无须username:password, 可略去,即如下
"保存"后即生效.
参见:
http://stackoverflow.com/questions/7559648/is-there-a-way-to-make-npm-install-the-command-to-work-behind-proxy
http://wil.boayue.com/blog/2013/06/14/using-npm-behind-a-proxy/
npm config delete http-proxy
npm config delete https-proxy
具体设置步骤如下:
1. 执行
npm config
后, 将看到下一行提示信息
npm config ls -l
to show all defaults.
2. 执行
npm config ls -l
后,在一大长串的settign中找出userconfig项(大概位于倒数第4项)
[b]userconfig [/b]= "C:\\Users\\USER_NAME\\.npmrc"
3. 编辑"C:\\Users\\USER_NAME\\.npmrc",
proxy = http://username:password@proxy.company.com:8080
https-proxy = http://username:password@proxy.company.com:8080/
如无须username:password, 可略去,即如下
proxy = http://proxy.company.com:8080
https-proxy = http://proxy.company.com:8080
"保存"后即生效.
参见:
http://stackoverflow.com/questions/7559648/is-there-a-way-to-make-npm-install-the-command-to-work-behind-proxy
http://wil.boayue.com/blog/2013/06/14/using-npm-behind-a-proxy/