npm install时报错如下图所示:

D:\Vue\demo>npm install
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm ERR! Unexpected end of JSON input while parsing near '...babel-core":"^4.7.0",'

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\nodejs\node_cache\_logs\2019-02-24T12_13_10_483Z-debug.log

D:\Vue\demo>npm ERR! Unexpected end of JSON input while parsing near '...babel-core":"^4.7.0",'

解决方法:

先清除cache,再重新安装

npm cache clean --force

 

Logo

前往低代码交流专区

更多推荐