Speeding up npm and Yarn access in China by changing the source

Speeding up npm and Yarn access in China by changing the source

💡 原文中文,约500字,阅读约需2分钟。
📝

内容提要

介绍使用cgr软件切换npm和Yarn的镜像源以加速国内访问,提供参考链接和致谢。

🎯

关键要点

  • npm 和 Yarn 默认源地址在国外,国内访问速度慢。
  • 使用命令 yarn config get registry 查看当前使用的镜像源。
  • 使用软件 cgr 快速切换 npm 和 Yarn 的镜像源。
  • 通过命令 npm install -g cgr 安装 cgr。
  • 使用 cgr ls 列出当前可用的镜像源。
  • 通过 cgr use taobao 选择淘宝镜像源进行切换。
  • 使用 cgr test taobao 测试访问速度。
  • 参考链接提供了更多关于 yarn 和 npm 的国内加速信息。
🏷️

标签

➡️

继续阅读