切换npm 国内镜像与国外镜像

1, 修改 下载仓库为淘宝镜像

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

npm config set disturl https://npm.taobao.org/dist --global

2, 如果要发布自己的镜像需要修改回来

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

3, 安装cnpm

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

4,查看当前地址

   npm config list

猜你喜欢

转载自blog.csdn.net/gaoqiang1112/article/details/80476179
今日推荐