📦 Yarn (快速的 Node.js 包管理器) - 清华大学镜像配置

复制以下命令到终端执行即可完成配置:

curl -sSL https://mirror2030.com/scripts/yarn-tsinghua.sh | bash
✅ 所有脚本开源透明,可在下方查看完整内容

适合想了解具体步骤的用户:

yarn config set registry https://mirrors.tuna.tsinghua.edu.cn/npm/

完整脚本内容(可复制保存):

#!/bin/bash
# Yarn 镜像配置 - 清华大学
# 由 镜像加速站 自动生成

echo "正在配置 Yarn 镜像源..."

# 设置镜像源
yarn config set registry https://mirrors.tuna.tsinghua.edu.cn/npm/

# 验证配置
echo "配置完成!当前镜像源:"
yarn config get registry

echo "\n✅ Yarn 镜像源已成功配置为 清华大学"
echo "如需恢复官方源,执行: yarn config delete registry"
⬇️ 下载脚本文件

💡 使用提示

  • 配置后请重启终端或运行 source ~/.bashrc
  • 如遇问题可访问 教程中心 查看详细指南
  • 建议定期测速选择最优镜像源
← 返回选择其他镜像源 🏠 返回首页