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/
相关推荐
专注代码七年12 小时前
NVM 使用指南(Node Version Manager)
npm
嘉禾望岗50318 小时前
Yarn介绍与HA搭建
大数据·hadoop·yarn
加载中36119 小时前
pnpm时代包版本不一致问题还是否存在
前端·面试·npm
励志成为糕手1 天前
Hadoop进程:深入理解分布式计算引擎的核心机制
大数据·hadoop·分布式·mapreduce·yarn
徐_三岁2 天前
关于npm的钩子函数
前端·npm·node.js
不买Huracan不改名2 天前
安装Codex(需要用npm)
前端·npm·node.js
醉方休2 天前
npm/pnpm软链接的优点和使用场景
前端·npm·node.js
醉方休2 天前
PNPM库离线安装方案
npm
FreeBuf_3 天前
加密货币武器化:恶意npm包利用以太坊智能合约实现隐蔽通信
前端·npm·智能合约
不知名raver(学python版)3 天前
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!
前端·npm·node.js