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/
相关推荐
等你许久_孟然几秒前
【CSS/HTML】左侧固定,右侧自适应的布局方式理解margin负值理论
前端·css·html·页面布局·margin负值理论
逆旅行天涯7 分钟前
基于Vue3内置的lodash函数库实现防抖节流
前端·javascript·vue.js
ulimpid39 分钟前
ENV | VUE3 的安装使用并跑通第一个项目(高效实操版)
npm·vue·node
zyplanke40 分钟前
避免glibc版本而报错,CentOS等Linux安装node.js完美方法
centos·node.js·glibc
williamdsy44 分钟前
【chrome 插件】初窥
前端·javascript·chrome·插件
谢尔登1 小时前
使用 npkill 快速清理本地 node_modules 文件
javascript·node.js
ededabo1 小时前
正则表达式的使用规则
开发语言·前端·爬虫·python·正则表达式
我是一只鱼啊1 小时前
前端 OnePiece CSS (娜美)篇
前端·css
南風知意1 小时前
🏅el-tooltip 组件在全屏状态下不显示提示框问题
前端·css
qq_417371721 小时前
vue+天地图+Openlayers
前端·vue.js