npm切换淘宝镜像与国外源

切换淘宝镜像与国外源

1、在cmd中查看当前镜像地址:

npm get registry

2、切换为淘宝镜像:

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

3、切换为原本的npm镜像:

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

2022 年更新 淘宝出了新域名地址

https://registry.npmmirror.com/

4、安装cnpm

 npm install -g cnpm --registry=https://registry.npm.taobao.org

猜你喜欢

转载自blog.csdn.net/weixin_52755319/article/details/118015160