常用的npm镜像源和配置npm、pnpm、yarn的registry

992 阅读1分钟
  1. 常用的 npm 镜像源

  2. 配置 npm、pnpm、yarn 的 registry

    • npm

      查看 npm 的 registry

      npm config get registry
      

      配置 npm 的 registry

      npm config set registry=https://registry.npmjs.org
      
    • yarn

      查看 yarn 的 registry

      yarn config get registry
      

      配置 yarn 的 registry

      yarn config set registry=https://registry.npmjs.org
      
    • pnpm

      查看 pnpm 的 registry

      pnpm config get registry
      

      配置 pnpm 的 registry

      pnpm config set registry=https://registry.npmjs.org