npm install 安装很慢怎么办?

安装源管理器nrm

bash 复制代码
sudo npm install -g nrm
#macOS

npm install -g nrm
#Windows以管理员身份运行

安装完毕之后通过以下命令可以切换你想要的源

bash 复制代码
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/
  huawei ------- https://repo.huaweicloud.com/repository/npm/

nrm use tencent
#切换腾讯源

SUCCESS  The registry has been changed to 'tencent'.
#源切换成功
相关推荐
金融小师妹1 天前
AI算法视角下非农夜冲击波来袭,黄金高位区间震荡态势的深度神经网络解析
大数据·深度学习·1024程序员节
全栈小53 天前
【数据库】浙人医携手金仓数据库,打造全国首个多院区异构多活容灾架构
数据库·1024程序员节·金仓
CoderYanger5 天前
贪心算法:7.最长连续递增序列
java·算法·leetcode·贪心算法·1024程序员节
CoderYanger5 天前
贪心算法:6.递增的三元子序列
java·算法·leetcode·贪心算法·1024程序员节
CoderYanger5 天前
贪心算法:1.柠檬水找零
java·算法·leetcode·贪心算法·1024程序员节
CoderYanger5 天前
贪心算法:4.摆动序列
java·算法·leetcode·贪心算法·1024程序员节
CoderYanger5 天前
贪心算法:2.将数组和减半的最少操作次数
java·算法·leetcode·贪心算法·1024程序员节
CoderYanger5 天前
贪心算法:8.买卖股票的最佳时机
java·算法·leetcode·贪心算法·1024程序员节
CoderYanger5 天前
贪心算法:3.最大数
java·算法·leetcode·贪心算法·1024程序员节
CoderYanger5 天前
贪心算法:5.最长递增子序列
java·算法·leetcode·贪心算法·1024程序员节