问题现象
执行以下命令,安装最新版 nrm
。
$ npm i -g nrm
执行以下命令
$ 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/
没有看到星(*)标注当前的 registry
。
执行以下命令
$ nrm current
没有任何输出
解决方法
执行以下命令,通过源码安装 nrm
$ npm install Pana/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/
$ nrm current
You are using npm registry.
网友评论