切换npm镜像

修改下载仓库为淘宝镜像

1、npm config set registry https://registry.npm.taobao.org --global
2、npm config set disturl https://npm.taobao.org/dist --global

重置自己原来的镜像

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

安装cnpm(不推荐)

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

查看当前镜像地址

npm config list

猜你喜欢

转载自blog.csdn.net/qq_25134721/article/details/84333668