NPM国内镜像源多选择与镜像快速切换工具(nrm)介绍

多镜像源选择

淘宝镜像(推荐)

镜像地址:https://registry.npmmirror.com

特性:官方推荐,镜像更新速度快,稳定性高。

使用方式:

复制代码
npm config set registry https://registry.npmmirror.com

恢复默认

复制代码
npm config set registry https://registry.npmjs.org

华为云开源镜像

镜像地址:https://mirrors.huaweicloud.com/repository/npm/

特性:华为提供的开源镜像,速度较快,可靠性高。

使用方式

复制代码
npm config set registry https://mirrors.huaweicloud.com/repository/npm/

腾讯云 npm 镜像

镜像地址:https://mirrors.cloud.tencent.com/npm/

特性:腾讯云提供,速度和可靠性不错。

使用方式

复制代码
npm config set registry https://mirrors.cloud.tencent.com/npm/

阿里云 npm 镜像

镜像地址:https://npm.aliyun.com/

特性:阿里云提供的镜像,但不如淘宝镜像更新频繁。

使用方式

复制代码
npm config set registry https://npm.aliyun.com/

清华大学开源镜像站

镜像地址:https://mirrors.tuna.tsinghua.edu.cn/npm/

特性:清华大学提供的开源镜像,稳定性和更新速度都不错。

使用方式

复制代码
npm config set registry https://mirrors.tuna.tsinghua.edu.cn/npm/

npm 镜像快速切换工具(nrm)

安装 nrm

复制代码
npm install -g nrm

查看可用镜像

复制代码
nrm ls

切换镜像

比如切换到淘宝镜像:

复制代码
nrm use taobao

恢复默认镜像

切换回官方的 npm 仓库:

复制代码
nrm use npm
相关推荐
laoli_coding8 小时前
如何配置HTTPS站点访问的免费SSL域名证书
网络协议·https·node.js·ssl
To_OC8 小时前
手写 AI 编程 Agent 的命令执行工具:我被 child_process 坑出来的实战经验
后端·node.js·agent
胡萝卜术8 小时前
从API调用到手写LRU:力扣146「LRU缓存」的哈希表+双向链表终极进化之路
前端·javascript·面试
科技道人8 小时前
记录 默认置灰/禁用 app ‘Search Engine Selector‘ 的disable按钮
开发语言·前端·javascript
天疆说8 小时前
Zotero Connector 在 Edge 里找不到桌面 Zotero(Linux / Zotero 9.0.6 / Edge 150)
linux·前端·edge
李伟_Li慢慢9 小时前
02-从硬件说起WebGL
前端·three.js
kyriewen10 小时前
看了微软几万人用AI编程的数据——效率涨24%的代价没人提
前端·ai编程·claude
2601_9637713710 小时前
How to Scale Your WordPress Store Traffic in 2026
前端·php·plugin
亿元程序员11 小时前
老板说我的3D箭头游戏用来做试玩太普通了,没人想玩,让我变点花样...
前端
李伟_Li慢慢11 小时前
01-threejs架构原理-课程简介
前端·three.js