问题

最近配了台新电脑,开始装Node环境,去官网下载了最新的Node安装包。安装也没有问题,但是在使用npm install这个命令的时候,就会出现Unexpected end of JSON input while parsing near这个异常信息。

原因

最新版本的的Node.jsnpm版本不合适的原因(因为没更新之前是不会的)。

解决方案

npm版本降到4.x版本

Windows下使用cmd执行语句:npm -g i npm@4
Mac系统也差不多。

npm install "Unexpected end of JSON input while parsing near"问题的更多相关文章

  1. 解决npm ERR! Unexpected end of JSON input while parsing near的方法

    这两天执行 npm install 时会报错误: npm ERR! Unexpected end of JSON input while parsing near 清除cache npm cache ...

  2. 【NPM】npm ERR! Unexpected end of JSON input while parsing near '...",'解决方案

    问题描述 今天安装项目依赖npm install 的时候出现错误: npm ERR! Unexpected end of JSON input while parsing near '...e&quo ...

  3. npm ERR! Unexpected end of JSON input while parsing near '...inimist":"^1.2.0"}

    简介 在项目中执行npm install安装依赖包的时候.出现npm ERR! Unexpected end of JSON input while parsing near '...inimist& ...

  4. 解决【npm ERR! Unexpected end of JSON input while parsing near '...sh_time":141072930277'】方案

    问题描述执行npm install的时候报错npm ERR! Unexpected end of JSON input while parsing near '...sh_time":141 ...

  5. npm err! Unexpected end of JSON input while parsing near解决办法

    npm install时出现npm err! Unexpected end of JSON input while parsing near错误 输入  npm cache clean --fore ...

  6. [NPM错误]npm ERR! Unexpected end of JSON input while parsing near ‘’

    [错误描述] npm ERR! Unexpected end of JSON input while parsing near ‘  ’ [前提描述] 在安装vue2-editor时,中断暂停了,再次 ...

  7. 当遇到npm ERR! Unexpected end of JSON input while parsing near……时的解决办法

    运行npm install时有时会遇到以下错误: npm ERR! Unexpected end of JSON input while parsing near ... 这时可以先执行下面的命令: ...

  8. npm ERR! Unexpected end of JSON input while parsing near '...'解决方法

    npm install时出现npm err! Unexpected end of JSON input while parsing near'...'错误 输入  npm cache clean -- ...

  9. npm ERR! Unexpected end of JSON input while parsing near...错误

    问题解决方案在GitHub中: https://github.com/vuejs-templates/webpack/issues/990 总结一下:1.删除package-lock.json 2.进 ...

随机推荐

  1. gulp 使用入门

    什么是gulp? 用自动化构建工具增强你的工作流程! Gulp 是基于node.js的一个前端自动化构建工具,开发者可以使用它构建自动化工作流程(前端集成开发环境). 使用gulp你可以简化工作量,让 ...

  2. 【工具向01】——markdown 文本编辑语言相关

    markdown简介 Markdown是一种轻量级标记语言创始人为约翰·格鲁伯.它允许人们"使用易读易写的纯文本格式编写文档,然后转换成有效的XHTML或HTML文档".这种语言吸 ...

  3. 主键映射和Hibernate映射

    组件映射 类组合关系的映射,也叫做组件映射! 注意:组件类和被包含的组件类,共同映射到一张表! 需求: 如汽车与车轮 代码示例: 1.JavaBean Wheel.java package com.g ...

  4. JDK7与JDK8中HashMap的实现

    JDK7中的HashMap HashMap底层维护一个数组,数组中的每一项都是一个Entry transient Entry<K,V>[] table; 我们向 HashMap 中所放置的 ...

  5. java中类的加载顺序介绍(ClassLoader)

    转自:http://blog.csdn.net/eff666/article/details/52203406 1.ClassNotFoundExcetpion  我们在开发中,经常可以遇见java. ...

  6. SPA页面初试

    之前一直很好奇,SPA应用到底是怎么实现的,昨天无意间看到了有一篇介绍的文章,就想着来试一下水(以下根据我的理解所写,可能会让你看的云里雾里,如果想加深了解,最好先了解下window.location ...

  7. 【LeetCode题解】232_用栈实现队列(Implement-Queue-using-Stacks)

    目录 描述 解法一:在一个栈中维持所有元素的出队顺序 思路 入队(push) 出队(pop) 查看队首(peek) 是否为空(empty) Java 实现 Python 实现 解法二:一个栈入,一个栈 ...

  8. C编程基础

    1. Hello World! 依照惯例首先Hello World镇楼: 1 #include<stdio.h> 2 3 int main(void) { 4 printf("H ...

  9. angularjs文档下载

    路过 存文件而已

  10. 无法将类型“System.Collections.Generic.List<anonymous type:string ClassID,string ClsssName>”隐式转换为“System.Collections.Generic.List<Ecology.Model.EnergyFlowGraph>”

    无法将类型“System.Collections.Generic.List<anonymous type:string ClassID,string ClsssName>”隐式转换为“Sy ...