1、安装nrm:
npm install nrm -g
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
输出:
SUCCESS The registry has been changed to 'taobao'.
nrm current
输出:
You are using taobao registry.