1.查看镜像源

npm get registry

2.切换官方源

npm config set registry http://registry.npmjs.org

3.切换淘宝源(最新版)

npm config set registry https://registry.npmmirror.com

 4.使用临时镜像源,当安装依赖不想切换源地址时,仅安装当前依赖可以使用

npm install xxx(依赖名) --registry=https://xxx(源地址)

 

相关文章:

  • 2021-08-14
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2021-05-29
  • 2021-07-18
猜你喜欢
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案