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/
相关推荐
treasure1409 分钟前
【复古】浅尝Django前后端不分离
前端·css·python·django·bootstrap·html·web
jay神1 小时前
基于 YOLOv8 的手势识别系统(Web 版)
前端·人工智能·python·深度学习·yolo·计算机视觉·计算机毕业设计
屏什么录1 小时前
长时间录屏中途崩溃:MP4 打不开的 6 种救回方案与参数设置
前端·音视频开发
code_Bo2 小时前
不只命令行:我把跨 Agent 会话同步做成了桌面应用
前端·javascript·后端
kyriewen2 小时前
AI 能把页面写出来,为什么改个需求就开始崩?
前端·javascript·人工智能
涛涛ing3 小时前
2026年最值得关注的前端变化,藏在“默认值”里
前端
亿元程序员5 小时前
太牛了!这AI做出来的游戏,居然还能变现!
前端
hellice5 小时前
闪传 FlashDrop 实战:我用 300 行 Node 代码做了个「4 位取件码」临时文件中转站
前端·产品
用户0829773260055 小时前
RTX 5500 MIG 踩坑记录:切分之后模型跑不起来,排错整整一下午
前端
Lank_M5 小时前
AI 放大后的图更清楚,但它不能当原图入库
前端