淘宝npm镜像源换新地址,npm设置最新淘宝镜像

原淘宝 npm 域名停止
http://npm.taobao.org 和 http://registry.npm.taobao.org 在 2022.06.30 号正式下线和停止 DNS 解析。

域名切换规则:

http://npm.taobao.org => http://npmmirror.com
http://registry.npm.taobao.org => http://registry.npmmirror.com

 

旧淘宝镜像

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

1.切换新的镜像源

npm config set registry https://registry.npmmirror.com

 然后再执行以下操作查看是否成功

npm config list

查看当前镜像地址
npm config get registry

如果没安装过淘宝镜像源的,则直接安装

npm install -g cnpm --registry=https://registry.npmmirror.com

或者

2.使用cnpm

可以使用定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:

npm install -g cnpm --registry=https://registry.npmmirror.com

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值