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/
相关推荐
北漂燕郊杨哥3 天前
npm 缓存占满 C 盘?三步把它迁到 D 盘(附验证与避坑)
缓存·npm·node
必须会一定会3 天前
Agent Handoff M5 发布验收:`CHANGES.md`、`npm pack`、`release:check` 与干净环境安装验证
前端·人工智能·npm·node.js·ai编程
剑胆琴心静水深流3 天前
全栈之路6---web集成与呈现
前端·vue.js·spring boot·分布式·spring·前端框架·npm
章鱼小丸子逃跑中3 天前
【2025最新版】如何将fnm与node.js安装在D盘?【保姆级安装及人性话理解教程】
前端·javascript·npm·node.js
凉凉的知识库4 天前
一文讲清 Spark 集群队列:YARN 多租户、容量隔离与资源共享
大数据·spark·yarn
qq_452396235 天前
第三篇:《包管理进化史:从 npm 到 pnpm,Monorepo 时代的依赖管理》
前端·npm·node.js
阿萨德528号6 天前
npm 包发布实战指南:从零发布、更新迭代到版本治理
前端·npm·策略模式
赖龙7 天前
pnpm vs npm
前端·npm·node.js
dyxal8 天前
ENOSPC 错误完全解析:文件监视器数量不足的终极解决方案
npm
_codemonster9 天前
npm run dev 是在开发模式运行,怎么在生产环境运行
前端·npm·node.js