npm、pnpm、yarn使用淘宝镜像

文章目录

npm

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

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

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

pnpm

安装方法

Windows

powershell 复制代码
iwr https://get.pnpm.io/install.ps1 -useb | iex

其它

shell 复制代码
curl -fsSL https://get.pnpm.io/install.sh | sh -

Or

shell 复制代码
wget -qO- https://get.pnpm.io/install.sh | sh -

Or

shell 复制代码
npm install -g pnpm

设置镜像

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

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

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

yarn

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

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

# 还原为官方镜像源
yarn config set registry https://registry.yarnpkg.com/
相关推荐
无责任此方_修行中2 天前
换个版本号就能升级?可没那简单:pnpm 11 升级踩坑记
javascript·后端·npm
ha_lydms2 天前
Hologres 简介
大数据·hadoop·阿里云·mapreduce·yarn·dataworks·hologres
leslie1184 天前
npm常用命令
前端·npm
__zRainy__4 天前
解决pnpm v10+不自动构建
前端·pnpm·工程化
不在逃避q5 天前
Trae/Vs Code/Cursor命令行无法跑npm命令
前端·arcgis·npm
半句唐诗5 天前
我是如何通过 Access Token 成功发布第一个 npm 包的
前端·npm·node.js
NutShell Wang7 天前
零依赖架构实战:451个HTML文件如何用63KB平均体积交付3584个交互模块
前端·人工智能·arcgis·npm·开源·html·vibe coding
兮动人10 天前
Linux 安装 Claude Code 实战:Node.js、npm、GLM 配置一次跑通
linux·npm·node.js·cc·claude code
lastHertz19 天前
openskill 实战指南:像管理 npm 包一样管理你的 AI Skill
前端·人工智能·npm