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

npm安装依赖时,报错如下

 

 解决方法(一)

(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

 
posted @ 2019-11-29 10:43  林玖女神  阅读(923)  评论(0编辑  收藏  举报