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/
相关推荐
码上飞扬4 小时前
快速切换淘宝最新镜像源npm
npm
csdn_aspnet4 小时前
npm 安装 与 切换 淘宝镜像
前端·npm·node.js
蜡笔小新星4 小时前
切换淘宝最新镜像源npm
vue.js·经验分享·学习·npm·node.js
程序猿代码之路4 小时前
如何切换淘宝最新镜像源npm
npm
程序猿看视界5 小时前
Halo 开发者指南——项目运行、构建
git·docker·node.js·pnpm·idea·openjdk·halo
Jiaberrr1 天前
轻松切换淘宝最新镜像源,加速npm依赖安装
前端·javascript·vue.js·npm·node.js
hai405871 天前
切换淘宝最新npm镜像源是
前端·npm·node.js
golove6661 天前
切换淘宝最新镜像源npm
npm·node.js
细水长流,生命不止1 天前
npm install报错,gyp verb `which` failed Error: not found: python
前端·python·npm
右恩1 天前
【无标题】切换淘宝最新镜像源 npm —— 提升前端开发效率的利器
npm