问题

最近配了台新电脑,开始装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. JavaSE-异常

    1.try catch finally 异常捕获 public class ExceptionTest { public static void main(String[] args) { int a ...

  2. Anaconda 科学计算环境与包的管理

    相信大多数 python 的初学者们都曾为开发环境问题折腾了很久,包管理和 python 不同版本的问题,特别是 window 环境安装个 scrapy 各种报错 ,使用 Anaconda 可以很好的 ...

  3. Spring Boot打包war jar 部署tomcat

    概述 1.Spring Boot聚合工程打包war部署Tomcat 2.Spring Boot打包Jar,通过Java -jar直接运行. 3.提供完整pom.xml测试项目 至github 4.项目 ...

  4. 论type与object的关系----Python创世纪

    这篇随笔的灵感来源于学习源码时对type及object关系的疑惑,主要参考了这篇论文: http://www.cs.utexas.edu/~cannata/cs345/Class%20Notes/15 ...

  5. 纯css竟可以做出边框这样长宽度的过渡效果

    边框效果如下:鼠标移到下面方形,就有效果   要是没有效果,点这个:https://murenziwei.github.io/testGit/Untitled1.html 正如你所看到的,这边框颜色只 ...

  6. es6学习笔记1

    最近在阅读<探索es6>,就把自己认为重要的做一点笔记,方便日后学习. 1.获取更多的es6资源的办法 有两组 ES6 资源: “ ECMAScript 6 Tools ”,作者 Addy ...

  7. C# int? 关键字

    1.int?  关键字说明 (1).int? 表示一个int类型,且该int类型可空,如果不加?的话,那么int类型的默认值为0,不能赋null值,代码如下: int aa = null; (2).当 ...

  8. API 与 SDK

    API 和SDK是软件行业的两个缩写词. API (Application Programming Interface)=应用程序编程接口 通过一套套的要求,用来管理应用程序之间的沟通.一个API相当 ...

  9. Oracle问题之ORA-12560TNS:协议适配器错误-转载

    作者:@haimishasha本文为作者原创,转载请注明出处:https://www.cnblogs.com/haimishasha/p/5394963.html 目录 Oracle问题之ORA-12 ...

  10. leetcode字符串系列

    3. 无重复字符的最长子串 给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度. 示例 1: 输入: "abcabcbb" 输出: 3 解释: 因为无重复字符的最长子串 ...