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/
相关推荐
小白探索世界欧耶!~14 小时前
npm/pnpm软链接
前端·npm·node.js
柚子味儿的西瓜14 小时前
npm install --legacy-peer-deps和npm install --force的区别
前端·npm·node.js
USER_A0011 天前
【Node.js】包的结构及发布
npm·node.js
一雨方知深秋2 天前
pnpm, eslint, vue-router4, element-plus, pinia
pnpm·pinia·element-plus·暂存区eslint·vue-router4
前端没钱2 天前
npm、yarn、pnpm 的异同及为何推荐 pnpm
前端·npm·node.js
星之卡比*3 天前
npm之后出现的文件夹
前端·npm·node.js
念九_ysl4 天前
Node.js 版本与 npm 的关系及版本特性解析:从开源项目看演进
npm·开源·node.js
郁大锤4 天前
NPM如何更换淘宝镜像——Node.js国内镜像配置教程
前端·npm·node.js
天马37984 天前
vue2老版本 npm install 安装失败_安装卡主
前端·npm·node.js·vue2
powerfulzyh5 天前
npm安装依赖(npm install)时遇到认证错误的解决方案
前端·npm·node.js