npm镜像源切换

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

或者安装nrm对镜像源进行管理

1, 安装

npm install -g nrm

2,查看可选源,*表示正在使用的

 nrm ls 
* npm ---------- https://registry.npmjs.org/
  yarn --------- https://registry.yarnpkg.com/
  tencent ------ https://mirrors.cloud.tencent.com/npm/
  cnpm --------- https://r.cnpmjs.org/
  taobao ------- https://registry.npmmirror.com/
  npmMirror ---- https://skimdb.npmjs.com/registry/

3,使用

nrm use taobao //切换

vue/cli 安装文档

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐