npm切换淘宝源

2023-04-16 0 697

npm

设置淘宝源

npm config set registry http://registry.npm.taobao.org

设置为官方源

npm config set registry https://registry.npmjs.org

查看当前源

npm get registry

使用代理

必须要是科学上网,并且工具在你的本地机器上开启了一个第三方服务器

npm config set proxy http://127.0.0.1:1080  # 1080是端口号

取消代理

npm config delete proxy

yarn

设置淘宝源

yarn config set registry https://registry.npm.taobao.org/

设置为官方源

yarn config set registry https://registry.npmjs.org

查看当前源

yarn config get registry

使用代理

yarn config set proxy http://127.0.0.1:1080  # 1080是端口号

取消代理

yarn config delete proxy

各种源地址

npm --- https://registry.npmjs.org/

cnpm --- https://r.cnpmjs.org/

taobao --- https://registry.npm.taobao.org/

nj --- https://registry.nodejitsu.com/

rednpm --- https://registry.mirror.cqupt.edu.cn/

npmMirror --- https://skimdb.npmjs.com/registry/

deunpm --- http://registry.enpmjs.org/

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务