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/
相关推荐
We་ct几秒前
LeetCode 34. 在排序数组中查找元素的第一个和最后一个位置:二分查找实战
前端·算法·leetcode·typescript·二分
Nan_Shu_614几秒前
学习:Cesium (4)
前端·学习
Loadings20 分钟前
聊聊 AI Coding 的最新范式:Harness Engineering:我们这群程序员,又要继续学了?
前端·后端
ssshooter22 分钟前
哈希是怎么被破解的?
前端·后端
Java陈序员25 分钟前
自建 Claude Code 镜像!一站式开源中转服务!
docker·node.js·vue·claude·claude code
蜡台28 分钟前
Vue 中多项目的组件共用方案
前端·javascript·vue.js·git
笨笨狗吞噬者33 分钟前
【uniapp】微信小程序实现自定义 tabBar
前端·微信小程序·uni-app
恋猫de小郭1 小时前
React Native 鸿蒙 2026 路线发布,为什么它的适配成本那么高?
android·前端·react native
呆头鸭L1 小时前
Electron进程通信
前端·javascript·electron·前端框架·vue
splage1 小时前
spring-boot-starter和spring-boot-starter-web的关联
前端