设置代理
npm config set proxy=http://127.0.0.1:8087
npm config set registry=http://registry.npmjs.org
1
2
关于https
经过上面设置使用了http开头的源,因此不需要设https_proxy了,否则还要增加一句:
npm config set https-proxy http://server:port
1
代理用户名和密码
npm config set proxy http://username:password@server:port
npm confit set https-proxy http://username:password@server:port
1
2
取消代理
npm config delete proxy
npm config delete https-proxy
作者:yanzi1225627
来源:CSDN
原文:https://blog.csdn.net/yanzi1225627/article/details/80247758
版权声明:本文为博主原创文章,转载请附上博文链接!