最近公司整合内网对一些外网的包下载需要走公司http代理
代理设置
HTTP
npm config set proxy=http://127.0.0.1:8081
或者需要用户名和密码情况
npm config set proxy http://username:password@server:port
HTTPS
pm config set https-proxy http://server:port
代理取消
npm config delete proxy
npm config delete https-proxy