修改镜像源加速npm

1.查看当前使用的镜像源

npm config get registry

2.修改镜像源

临时修改

npm install 软件名 --registry https://registry.npm.taobao.org/

全局修改

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

3.使用第三方软件修改切换镜像源 nrm

安装nrm

npm install -g nrm

查看当前所有可用镜像源

nrm ls

使用淘宝镜像源

nrm use taobao

测试访问速度

nrm test taobao

from: https://learnku.com/articles/15975/npm-accelerate-and-modify-mirror-source-in-china

猜你喜欢

转载自www.cnblogs.com/hankleo/p/12509627.html