解决npm ERR!Unexpected end of JSON input while paring near (解析附近时JSON输入意外结束)'...."^2.0.0-rc.0","glob"'等npm install错误
摘要
最近更新了一次node,但是更新后npm的命令总是会报
npm WARN deprecated fsevents@2.0.6: Please update: there are crash fixes
npm WARN deprecated text-encoding@0.7.0: no longer maintained
npm WARN deprecated fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN deprecated core-js@2.3.0: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ajv@^6.5.5 (node_modules\har-validator\node_modules\ajv):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected end of JSON input while parsing near '...:"^2.0.0-rc.0","glob"'
npm ERR! Unexpected end of JSON input while parsing near '...:"^2.0.0-rc.0","glob"'
的错误信息,导致无法进行正常的npm install。经过半天的错误信息搜索,找到了较为友好的解决办法。
解决办法
方法一:清除npm缓存
具体命令步骤:
npm cache clean --force //清除npm缓存
npm install @(Library you need) //下载安装你需要的库
方法二:删除合并文件
具体命令步骤:
删除package.lock.json合并文件
npm install @(Library you need) //下载安装你需要的库
方法三:配置默认注册表
具体命令步骤:
注册表配置修改为默认值:
npm config set registry https://registry.npmjs.org/
参考地址:https://github.com/npm/npm/issues/19072
总结
分享一下解决npm的JSON意外结束的方法,大家如果有更好的办法可以评论出来,一起学习。。。
解决npm ERR!Unexpected end of JSON input while paring near (解析附近时JSON输入意外结束)'...."^2.0.0-rc.0","glob"'等npm install错误的更多相关文章
- 解决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 ...
- 解决【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 ...
- 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 ...
- 当遇到npm ERR! Unexpected end of JSON input while parsing near……时的解决办法
运行npm install时有时会遇到以下错误: npm ERR! Unexpected end of JSON input while parsing near ... 这时可以先执行下面的命令: ...
- 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 -- ...
- 【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 ...
- 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& ...
- [NPM错误]npm ERR! Unexpected end of JSON input while parsing near ‘’
[错误描述] npm ERR! Unexpected end of JSON input while parsing near ‘ ’ [前提描述] 在安装vue2-editor时,中断暂停了,再次 ...
- npm ERR! Unexpected token in JSON at position 0 while parsing near '<HTML> 解决办法
npm ERR! Unexpected token in JSON at position 0 while parsing near '<HTML> npm ERR! <!--/// ...
随机推荐
- UML期末复习题——2.4:Domain Model
第四题:领域模型 重要概念: 1. 领域模型:是对领域内的概念类或现实世界中对象的可视化表示.领域模型也称为概念模型,领域对象模型和分析对象模型. 2. 应用UML表示法,领域模型被描述为一组没有定义 ...
- JAVA将两个byte数组合并为一个
/** * 将两个byte数组合并为一个 * @param data1 要合并的数组1 * @param data2 要合并的数组2 * @return 合并后的新数组 */ public stati ...
- android studio gradle国内代理设置
android studio在开始都各项目之前都会遇到 gradle 的同步,而在同步过程中很多依赖下载特别慢甚至出现无法现在的情况,有的时候等的时间特别长,甚至要一天,关键是等了大半天之后突然报错, ...
- LocalDB数据库修改排序规则,修复汉字变问号
VS中新增的轻量级数据库LocalDB,有个这个,开发人员就不必再安装庞大的SQL server了,可以方便地测试运行小型项目:既然是轻量级数据库,它抛弃了庞大的身躯,功能上当然也会受到局限,其中之一 ...
- mysql软件升降级及配置参数
1.下载mysql5.7的软件 https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.20-linux-glibc2.12-x86_64.tar.g ...
- Qt编写数据可视化大屏界面电子看板8-调整间距
一.前言 在数据可视化大屏界面电子看板系统中,前期为了使用目标客户机,调整间距是必不可少的工作,QMainWindow中的QDockWidget,会默认生成布局和QSplitter调整宽高大小,鼠标移 ...
- pip安装软件报错 utf-8 code can't decode byte 0xcf in position7
pip安装软件报错 utf-8 code can't decode byte 0xcf in position7 根据错误提示的路径找到__init__.py文件 根据错误提示的最后几句话找到对应的行 ...
- mysql访问慢解决
配置变更思路: 扩大MySQL连接数至2000,同时扩大操作系统最大文件描述符:扩大innodb缓存池 操作步骤: vi /etc/my.cnf max_connections = 2000innod ...
- 知识点整理-mysql怎么查看优化器优化后的sql
背景 1.新建两张表 CREATE TABLE t1 (m1 )); CREATE TABLE t2 (m2 )); 2.插入些数据 INSERT INTO t1 VALUES(, , , 'c'); ...
- 使用Optioanl优雅的处理空值
业务中的空值 场景 存在一个UserSearchService用来提供用户查询的功能: public interface UserSearchService{ List listUser(); Use ...