Skip to content

npm使用国内镜像加速

  1. 修改镜像源

    • 华为云
      npm config set registry https://mirrors.huaweicloud.com/repository/npm/
    • 腾讯云
      npm config set registry http://mirrors.cloud.tencent.com/npm/
    • 淘宝
      npm config set registry https://registry.npmmirror.com
  2. 使用淘宝定制的cnpm安装

    1. 安装cnpm
      npm install -g cnpm --registry=https://registry.npmmirror.com
    2. 使用cnpm
      cnpm install xxx

最近更新:10/11/2024, 4:54:47 AM

原文链接:npm使用国内镜像加速

|下一篇:MySQL创建用户并授权