如果国外官方的npm仓库下载速度很慢的话,可以考虑更换npm仓库,加快下载包的速度。 
1.通过config命令

npm config set registry https://registry.npm.taobao.org 

npm config list #查看npm当前配置

 

2.命令行指定 
每次执行命令前加入–registry指定仓库路径

npm --registry https://registry.npm.taobao.org install

 

 

3.编辑 ~/.npmrc 加入下面内容

registry = https://registry.npm.taobao.org

相关文章:

  • 2022-12-23
  • 2022-01-29
  • 2022-12-23
  • 2021-06-06
  • 2021-11-09
  • 2021-08-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2021-07-22
  • 2021-04-24
  • 2021-11-28
  • 2021-07-12
相关资源
相似解决方案