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/
相关推荐
孟陬1 天前
#教程 dw, dm, dy, d18m 是何意?万物可 Badge | 定制漂亮精致小徽章,打造眼前一亮 README
npm·github
hasty4 天前
不上传新包,也能改变用户拿到的版本:npm dist-tag 的 OIDC 权限治理
前端·npm·node.js
玖石书6 天前
HiSH 通过 apk 安装 Node.js、npm 与 pnpm
npm·node.js·鸿蒙·hish
FACELESS VOID6 天前
wsl下使用npm,错误识别到了windows下的npm
linux·windows·npm
搬砖的小码农_Sky8 天前
AI Agent:Windows上Node.js安装后 npm -v报错
前端·npm·node.js·人机交互
梅孔立10 天前
Codex 完整教程(Node.js安装 + npm安装Codex + DeepSeek配置 + 快捷键 + 设置)
前端·npm·node.js
AlfredZhao17 天前
npm 源切换:一条命令搞定
npm
@tangguo12318 天前
npm 和 yarn 配置说明
前端·javascript·npm·node.js·yarn
Gl�ria18 天前
Yarn NM 常驻Flink任务下线:stop/savepoint 释放容器
flink·yarn
钝挫力PROGRAMER22 天前
npx 与 npm 全局安装/更新/卸载
npm·npx·mcp·dsh