npm 配置代理
npm config set proxy http://[ip]:[port]
npm config set https-proxy http://[ip]:[port]
如果代理需要认证的话可以这样来设置
npm config set proxy http://username:password@server:port
npm config set https-proxy http://username:pawword@server:port
查看npm配置
npm config get
or
npm config list
清除npm代理
npm config delete proxy
and
npm config delete https-proxy
网友评论