首页 > 其他分享 >通过nrm工具进行npm镜像源的切换管理

通过nrm工具进行npm镜像源的切换管理

时间:2022-11-21 12:23:20浏览次数:44  
标签:npm nrm registry https 镜像 com

// 全局安装nrm -i是install的缩写 表示安装 -g是globle的缩写 别欧式全局
// 这样可以在任何命令行窗口使用nrm
 npm i 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 use taobao
/* Registry has been set to: https://registry.npmmirror.com/ */
// 检查镜像源是否切换成功
npm get registry
/* https://registry.npmmirror.com/ */

标签:npm,nrm,registry,https,镜像,com
From: https://www.cnblogs.com/yangSad/p/16911049.html

相关文章