npm install "Unexpected end of JSON input while parsing near"问题
2018-06-09 10:59
411 查看
问题
最近配了台新电脑,开始装Node环境,去官网下载了最新的Node安装包。安装也没有问题,但是在使用
npm install这个命令的时候,就会出现
Unexpected end of JSON input while parsing near这个异常信息。
原因
最新版本的的
Node.js与
npm版本不合适的原因(因为没更新之前是不会的)。
解决方案
将
npm版本降到
4.x版本
在
Windows下使用
cmd执行语句:
npm -g i npm@4
Mac系统也差不多。
相关文章推荐
- npm install出现"Unexpected end of JSON input while parsing near"错误解决方法
- npm install出现"Unexpected end of JSON input while parsing near"错误解决方法
- npm install出现"Unexpected end of JSON input while parsing near"错误解决方法
- NPM Unexpected end of JSON input while parsing near
- NPM Unexpected end of JSON input while parsing near
- npm ERR! Unexpected end of JSON input while parsing near '...on":"0.10.3","direc to'
- npm install报错"Unexpected end of JSON input while parsing near"
- 解决“npm ERR! Unexpected end of JSON input while parsing near '...,"version":"1.3.1","d'”错误
- angular 出现"Unexpected end of JSON input while parsing near"错误解决方法
- npm err! Unexpected end of JSON input while parsing near解决办法
- Unexpected end of JSON input while parsing near错误解决办法
- Unexpected end of JSON input while parsing near错误解决办法
- npm install 报错:error Unexpected end of JSON input while parsing near '...https://registry.npmj'的解决办法
- npm install出现"Unexpected end of JSON input while parsing near"
- npm install出现"Unexpected end of JSON input while parsing near"错误解决方法
- [npm] 一个命令解决Unexpected end of JSON input... 问题
- 用create-react-app创建APP出错或者npm ERR! Unexpected token in JSON at position 1 while parsing near
- VC++6.0中常出现的"unexpected end of file while looking for precompiled header directive"的问题
- VC++6.0中常出现的"unexpected end of file while looking for precompiled header directive"的问题?
- npm install 的时候 出现 unexpected end of file的问题