2024最新国内镜像源设置(npm、yarn、pnpm)

淘宝镜像源
https://registry.npmmirror.com/

腾讯云镜像源
https://mirrors.cloud.tencent.com/npm/

cnpm是一个基于npm的中国镜像源
https://r.cnpmjs.org/

复制代码
# 查询当前使用的镜像源
npm get registry

# 设置为淘宝镜像源
npm config set registry https://registry.npmmirror.com/

# 还原为官方镜像源
npm config set registry https://registry.npmjs.org/

yarn设置国内镜像源

复制代码
# 查询当前使用的镜像源
yarn config get registry

# 设置为淘宝镜像源
yarn config set registry https://registry.npmmirror.com/

# 还原为官方镜像源
yarn config set registry https://registry.yarnpkg.com/

pnpm设置国内镜像源

复制代码
# 查询当前使用的镜像源
pnpm get registry

# 设置为淘宝镜像源
pnpm config set registry https://registry.npmmirror.com/

# 还原为官方镜像源
pnpm config set registry https://registry.npmjs.org/
相关推荐
IT_陈寒4 分钟前
为什么我的JavaScript闭包总是漏掉那个变量?
前端·人工智能·后端
两只羊ovo24 分钟前
前端八股之 storage & this:两个最容易卡住的点,一次讲透
前端
用户9210802628637 分钟前
Bubble 打字机效果实践:从项目配置到源码实现
前端
weixin_461408581 小时前
npm npx yarn
开发语言·前端·javascript
四千岁1 小时前
RAG系统中的分块
前端·javascript·后端
START_GAME1 小时前
MSSQL$SQL2016
java·服务器·前端
Captaincc2 小时前
Show me your works & token -稀土掘金上线内测作品广场和用量统计
前端·掘金社区·vibecoding
进击的明明2 小时前
闭包:JavaScript里的“随身背包” 🎒
前端·javascript·面试
紫幽3 小时前
从 0 用 Vue 做屏并生成 LVGL 单片机代码(完整源码备忘)
前端·单片机