随时切换 NPM 镜像

 全局安装nrm

mac 安装时 npm 报错话可能是权限不足,命令前加上 sudo 即可

npm install -g nrm 

查看所有镜像

nrm ls 

ss@sdeMacBook-Pro ~ % 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/

nrm use taobao 即可切换到镜像源

你可能感兴趣的:(npm,前端,node.js)