解决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! <!--/// ...
随机推荐
- ffmpeg+nginx搭建直播服务器
Nginx与Nginx-rtmp-module搭建RTMP视频直播和点播服务器 https://zhuanlan.zhihu.com/p/28009037 FFmpeg总结(十三)用ffmpeg基于n ...
- linux下如何使rtc设备注册为指定的设备文件/dev/rtc1?
答: 通过设备树中的aliases节点来指定即可; 如某rtc设备的节点名为rtc@68,那么想让系统为该设备生成指定的设备文件/dev/rtc1,那么就在设备树的根节点中增加aliases节点,示例 ...
- kotlin数据解构
fun main(arg: Array<String>) { val person = person("tom") var (name) = person//解构 pr ...
- OpenStack Nova Release(Rocky to Train)
目录 文章目录 目录 前言 演进方向 Cellv2 更新 Rocky Support disabling a cell Stein Handling a down cell Train Count q ...
- iOS知识点总结
1.监测网络状态: - (void)checkNetwork { __block NSString *tips; _reachiabilityManager = [AFNetworkReachabil ...
- 反向代理远端 单台tomcat 使用ip+端口
.环境 nginx 10.1.1.161 公网:123.58.251.166 tomcat 10.1.1.103 .tomcat 配置 [root@host---- ~]# netstat -tnlp ...
- BP神经网络算法预测销量高低
理论以前写过:https://www.cnblogs.com/fangxiaoqi/p/11306545.html,这里根据天气.是否周末.有无促销的情况,来预测销量情况. function [ ma ...
- Shader 中的颜色计算
下面介绍 Shader 中 gl_FragColor 的计算与转换: 一.颜色计算 1. 加 这里要讲讲三原色和三基色:三原色一般指的是红.绿.蓝三种,简称 RGB,这是加色系.就是光源只含有特定的波 ...
- 34.TCP非阻塞连接及套接字异常处理丶端口扫描脚本
TCP非阻塞及套接字异常处理: TCP阻塞套接字异常捕获: 套接字创建失败,8000 socket.error 客户端连接错误: ConnectionRefusedError socket.gaier ...
- 冲刺Noip2017模拟赛3 解题报告——五十岚芒果酱
题1 素数 [问题描述] 给定一个正整数N,询问1到N中有多少个素数. [输入格式]primenum.in 一个正整数N. [输出格式]primenum.out 一个数Ans,表示1到N中有多少个素 ...