node nrm镜像源管理 npm版本切换

查看node 版本
node -v
查看node安装路径
where node
清除nodejs安装目录下node_cache的缓存(针对部安装vue-cli时提示 npm ERR! code EEXIST npm ERR! path)
npm cache clean --force(清除node缓存)
以上命令清除无效了请清除以下目录文件
C:\Program Files\nodejs\node_cache
设置缓存以及全局
npm config set prefix “D:\Program Files\nodejs\node_global”
npm config set cache “D:\Program Files\nodejs\node_cache”

https://blog.csdn.net/weixin_43937400/article/details/106481384
https://blog.csdn.net/haisong/article/details/104585361/

--------nrm
在命令行执行命令,npm install -g nrm,全局安装nrm

C:\WINDOWS\system32>nrm ls

  npm -------- https://registry.npmjs.org/
  yarn ------- https://registry.yarnpkg.com/
  cnpm ------- http://r.cnpmjs.org/
* taobao ----- https://registry.npm.taobao.org/
  nj --------- https://registry.nodejitsu.com/
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/

其中,带*的是当前使用的源,上面的输出表明当前源是官方源
切换node源
如果要切换到taobao源,执行命令nrm use taobao
增加node源
增加定制的源,特别适用于添加企业内部的私有源,执行命令 nrm add ,其中reigstry为源名,url为源的路径
nrm add registry http://registry.npm.frp.trmap.cn/
删除node源
nrm del registry http://registry.npm.frp.trmap.cn/
可以通过 nrm test 测试相应源的响应时间
nrm test npm

nvm 切换nodejs版本管理工具
https://www.cnblogs.com/gaozejie/p/10689742.html
ng --version

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

gzjiert

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值