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/
相关推荐
云水一下2 小时前
模块系统与 npm——万物皆模块
前端·npm·node.js
冷色调的咖啡师5 小时前
4.大数据高可用
大数据·linux·hadoop·hdfs·zookeeper·yarn
冷色调的咖啡师6 小时前
1.大数据架构技术 上——搭建分布式Hadoop集群
大数据·linux·hadoop·分布式·hdfs·架构·yarn
weixin_461769401 天前
npm 修改镜像源依赖下载缓慢运行报错日志解决
前端·npm·node.js
孟郎郎2 天前
TimeoutError: The operation was aborted due to timeout at new DOMException
ai·前端框架·npm·vue·pnpm·deepseek
神秘代码行者2 天前
pnpm zip命令详解
前端·npm·pnpm
爱喝热水的呀哈喽3 天前
npm 双网切换
前端·npm·node.js
wyc是xxs3 天前
用纯 Node.js 写了一个 JS 解释器 — kernel-js-lite
开发语言·javascript·npm·node.js
bestlanzi4 天前
使用nvm管理node环境
前端·vue.js·npm
weifengma-wish5 天前
通过NPM安装claude code
前端·npm·node.js