npm安装、切换淘宝镜像

02-27 1490阅读 0评论

npm默认镜像源是国外的,安装依赖速度较慢,使用国内的镜像源速度会快一些。

npm安装、切换淘宝镜像,npm安装、切换淘宝镜像,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,安装,设置,第1张
(图片来源网络,侵删)

1、设置淘宝镜像源:

npm config set registry https://registry.npm.taobao.org

2、查看当前镜像源:

npm config get registry

3、设置官方镜像源:

npm config set registry https://registry.npmjs.org

还可以使用nrm查看和切换镜像

//安装nrm,一定要全局安装
npm install -g nrm
//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/
 
//如果使用nrm ls发现全面都没有带*,则可以参考最后面的教程
 
//切换镜像源命令
nrm use xxx  //例:nrm use taobao 就可以切换自己想用的镜像源了
 
//当前使用的源
nrm current
taobao
 
npm安装、切换淘宝镜像,npm安装、切换淘宝镜像,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,安装,设置,第2张
(图片来源网络,侵删)
npm安装、切换淘宝镜像,npm安装、切换淘宝镜像,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,安装,设置,第3张
(图片来源网络,侵删)

免责声明
本网站所收集的部分公开资料来源于AI生成和互联网,转载的目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复: 表情:
评论列表 (暂无评论,1490人围观)

还没有评论,来说两句吧...

目录[+]