npm及yarn设置和取消代理的方法
npm设置代理
# npm config set proxy http://192.168.16.28:8118
# npm config set https-proxy http://192.168.16.28:8118
# npm config set registry=https://registry.npm.taobao.org
# npm config ls
# npm install -g yarn
代理用户名和密码
npm config set proxy http://username:password@server:port
npm confit set https-proxy http://username:password@server:port
或者编辑用户目录下的~/.npmrc file
proxy=http://username:password@host:port
https-proxy=http://username:password@host:port
npm取消代理
npm config delete proxy
npm config delete https-proxy
yarn代理配置
yarn config set proxy http://username:password@host:port
yarn config set https-proxy http://username:password@host:port
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/02/25/npm-yarn-proxy-set-unset/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
npm及yarn设置和取消代理的方法
npm设置代理
# npm config set proxy http://192.168.16.28:8118
# npm config set https-proxy http://192.168.16.28:8118
# npm config set registry=https:……
文章目录
关闭
共有 0 条评论