问题

最近配了台新电脑,开始装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. Python做int()强制类型转换的时候,小数是如何取舍的?

    白月黑羽今天给大家分享一个冷知识:) int()强制类型转换小数是如何取舍的? 使用 int() 将小数转换为整数,小数取整会采用比较暴力的截断方式,即小数点后面的会被强制舍去,向下取整. 例如:5. ...

  2. SSH-公私钥认证

    Linux下SSH的认证方式有两种,即密码认证和公私钥认证. 我们在日常的安全维护中,出于安全的考虑,密码不明文存放,会使用公私钥认证方式.这个时候我们就需要使用ssh-keygen,ssh-keyg ...

  3. 【webserver】使用python实现webserver,支持上传下载文件

    #!/usr/bin/env python """Simple HTTP Server With Upload. This module builds on BaseHT ...

  4. c++中友元机制

    友元的概念:遵循一定规则而使对象以外的软件系统能够不经过消息传递方式而直接访问对象内封装的数据成员的技术方法便是友元. 只要将外界的某个对象说明为一个类的友元,那么这个外界对象就可以访问这个类对象中的 ...

  5. [转]magento2项目上线注意事项 切换到产品模式

    本文转自:https://segmentfault.com/a/1190000007929783 切换到产品模式 php magento deploy:mode:set production 执行以上 ...

  6. Direct2D教程I——简介及首个例子

    在博客园里,系统的Direct2D的教程比较少,只有“万一”写了一个关于Direct2D的系列(Delphi 2009).于是,仿照其系列,写一个在VS下的Direct2D系列教程. 博客园中的高手还 ...

  7. VC++窗口创建过程,图形绘制,时钟程序

    创建窗口步骤: (1)注册窗口类(RegisterClassEx) (2)创建窗口(CreateWindowEx) (3)在桌面显示窗口(ShowWindow) (4)更新窗口客户区(UpdateWi ...

  8. angularjs学习第一天笔记

    您好,我是一名后端开发工程师,由于工作需要,现在系统的从0开始学习前端js框架之angular,每天把学习的一些心得分享出来,如果有什么说的不对的地方,请多多指正,多多包涵我这个前端菜鸟,欢迎大家的点 ...

  9. 图解 SQL-Server新建作业

    1,启动SQL Server代理(SQL Server Agent),如下图所示: 2,右击作业--新建作业--常规--填写作业名称 3,步骤--新建 4,步骤名称--数据库名--要执行的存储过程名 ...

  10. Oracle TO_DATE() 函数格式化时间【全】

    TO_DATE格式(以时间:2007-11-02   13:45:25为例)          Year:             yy two digits 两位年                显 ...