nrm 可以快速的帮我们在不同的镜像中切换。安装npmshell自动换行复制npm i -g nrm yarnshell自动换行复制yarn global add nrm 命令查看镜像列表shell自动换行复制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/ 选择镜像使用淘宝镜像shell自动换行复制nrm use taobao 查看当前源shell自动换行复制nrm current 结果如下:自动换行复制SUCCESS The registry has been changed to 'taobao'. 测试速度shell自动换行复制nrm test 结果如下:自动换行复制 npm ---------- 1013 ms yarn --------- 1437 ms tencent ------ 101 ms cnpm --------- 1364 ms * taobao ------- 215 ms npmMirror ---- 1865 ms 常见问题mac m1 芯片可能会修改失败,可以执行以下命令解决shell自动换行复制npm uninstall -g nrm npm i -g @adams549659584/nrm
评论区
评论加载中...