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/
相关推荐
天若有情6732 天前
自己开发一款极简 Vanilla 原生前端框架,已开源上架 NPM & GitHub
前端框架·npm·github
TT_Close2 天前
看懂 VSCode 发布中心后,下一步该把 App 发版交给 CLI 了
npm·开源·app
前端之虎陈随易4 天前
有生之年系列,Nodejs进程管理pm2 v7.0发布
前端·typescript·npm·node.js
网络点点滴6 天前
NPM的包版本管理
前端·npm·node.js
Allen正心正念20256 天前
前端——Node.js&npm,学点前端的东西
前端·npm·node.js
软件技术NINI7 天前
webkit简介及工作流程
开发语言·前端·javascript·udp·ecmascript·webkit·yarn
带娃的IT创业者7 天前
Bitwarden CLI 供应链攻击深度分析:当密码管理工具本身成为安全威胁
安全·npm·安全漏洞·cli·供应链攻击·bitwarden
拾贰_C7 天前
【node.js | Ubuntu | update】如何升级旧的nodejs本版至最新;如何升级npm
ubuntu·npm·node.js
网络点点滴8 天前
NPM 和 package.json 文件简介
前端·npm·json
青木9608 天前
前后端开发调试运行技巧
linux·服务器·前端·后端·npm·uv