npm安装依赖时,报错如下

npm安装依赖时报错, Unexpected end of JSON input while parsing near '....0","babel-eslint":"^'

 

 解决方法(一)

(1)清缓存: npm cache clean --force

(2)安装淘宝镜像:npm install --registry=https://registry.npm.taobao.org

解决方法(二)

方案一不行的话,用方案二

(1)清缓存:npm cache clean --force

(2)切换为官方镜像:npm set registry https://registry.npmjs.org/

本人用的方案二解决的这个问题。

原文摘自:https://www.cnblogs.com/GeniusLyzh/p/9773440.html

 

相关文章:

  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2021-09-29
  • 2022-01-07
  • 2021-06-26
猜你喜欢
  • 2022-12-23
  • 2021-08-25
  • 2021-09-30
  • 2022-01-13
  • 2022-02-10
  • 2022-12-23
相关资源
相似解决方案