npm设置代理

我只是一个虾纸丫 提交于 2019-12-06 10:12:33

工作环境走代理上网,npm不能下载,报错connect ETIMEDOUT

1.设置代理

## http
npm config set proxy=http://server:port
## https
npm config set https-proxy http://server:port

2.代理需要用户名密码

## http
npm config set proxy http://username:password@server:port
## https
npm confit set https-proxy http://username:password@server:port

3.取消代理

## http
npm config delete proxy
## https
npm config delete https-proxy
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!