1. 新增 package-lock.json
2. 相关 babel 更新
重新安装
- $ npm install babel - preset - env--save - dev
.babelrc 文件修改
3.
- {
- + "presets": ["env"]
- - "presets": ["es2015"]
- }
- Installing ERROR | Unexpected end of JSON input while parsing near ' : '
安装一直报错,这个时候需要清除缓存 npm cache clean --force
来源: http://www.bubuko.com/infodetail-2437605.html