详细见:https://npm.taobao.org/

淘宝镜像:

npm install -g cnpm --registry=https://registry.npm.taobao.org

然后就可以使用cnpm代替npm

设置默认:

 npm install -g cnpm --registry=https://registry.npm.taobao.org
 npm config set registry https://registry.npm.taobao.org

同步模块

直接通过 sync 命令马上同步一个模块, 只有 cnpm 命令行才有此功能:

cnpm sync connect

当然,最好建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2021-10-20
  • 2021-06-05
  • 2021-06-01
  • 2021-08-13
  • 2021-06-13
猜你喜欢
  • 2021-11-11
  • 2021-08-22
  • 2021-07-06
  • 2022-01-11
  • 2021-07-14
  • 2022-12-23
相关资源
相似解决方案