设置代理
命令行窗口输入:
npm config set proxy http://server:port
如果需要设 https_proxy:
npm config set https-proxy http://server:port
设置了 proxy 就不需要设置 https-proxy 了。
如果需要代理用户名和密码
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 或者 npm config set proxy null npm config set https-proxy null