ref:
https://blog.csdn.net/yanzi1225627/article/details/80247758
设置代理
npm config set proxy=http://127.0.0.1:8087
npm config set registry=http://registry.npmjs.org
关于https
经过上面设置使用了http开头的源,因此不需要设https_proxy了,否则还要增加一句:
npm config set https-proxy http://server:port
代理用户名和密码
npm config set proxy http://username:password@server:port
npm confit set https-proxy http://username:password@server:port
取消代理
npm config delete proxy
npm config delete https-proxy
网友评论