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/
相关推荐
烛阴20 分钟前
Smoothstep
前端·webgl
若梦plus41 分钟前
Eslint中微内核&插件化思想的应用
前端·eslint
爱分享的程序员42 分钟前
前端面试专栏-前沿技术:30.跨端开发技术(React Native、Flutter)
前端·javascript·面试
超级土豆粉43 分钟前
Taro 位置相关 API 介绍
前端·javascript·react.js·taro
若梦plus1 小时前
Webpack中微内核&插件化思想的应用
前端·webpack
若梦plus1 小时前
微内核&插件化设计思想
前端
柯北(jvxiao)1 小时前
搞前端还有出路吗?如果有,在哪里?
前端·程序人生
90后的晨仔1 小时前
条件渲染:从传统原生到 Vue 的进化之路
前端·vue.js
草履虫建模1 小时前
RuoYi-Vue 项目 Docker 容器化部署 + DockerHub 上传全流程
java·前端·javascript·vue.js·spring boot·docker·dockerhub
伍哥的传说2 小时前
React & Immer 不可变数据结构的处理
前端·数据结构·react.js·proxy·immutable·immer·redux reducers