解决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! <!--/// ...
随机推荐
- SQL-W3School-高级:SQL LEFT JOIN 关键字
ylbtech-SQL-W3School-高级:SQL LEFT JOIN 关键字 1.返回顶部 1. SQL LEFT JOIN 关键字 LEFT JOIN 关键字会从左表 (table_name1 ...
- Qt osg QWidget osgViewer::Viewer
osgViewer::Viewer* _viewer = nullptr; _viewer = new osgViewer::Viewer;osg::ref_ptr<osg::Group> ...
- setInterval、clearInterval的回调函数,实现函数间调用的先后顺序
定义: var waitUnitil=function (untillCallBack, nextStepCallBack, count) { if (count == null) { count = ...
- [Scikit-learn] 2.3 Clustering - Spectral clustering
From: 2.3.5 Clustering - Spectral clustering From: 漫谈 Clustering (4): Spectral Clustering From: 漫谈 C ...
- PAT 甲级 1019 General Palindromic Number (进制转换,vector运用,一开始2个测试点没过)
1019 General Palindromic Number (20 分) A number that will be the same when it is written forwards ...
- windows注册服务
Windows服务是运行一些服务程序的较好方式(这些程序专门为各种功能提供服务,无操作界面,运行在后台),其创建方法也很简单,通过系统自带的sc命令即可方便的创建. sc命令创建Windows服务的方 ...
- Java工程师学习指南第6部分:深入理解JVM虚拟机
本文整理了微信公众号[Java技术江湖]发表和转载过的JVM虚拟机相关优质文章,想看到更多Java技术文章,就赶紧关注本公众号吧吧. JVM原理分析,看了都说好 JVM 深入学习:Java 解析 Cl ...
- 基于c开发的全命令行音频播放器
cmus是一个内置了音频播放器的强大的音乐文件管理器.用它的基于ncurses的命令行界面,你可以浏览你的音乐库,并从播放列表或队列中播放音乐,这一切都是在命令行下. Linux上安装cmus 首先, ...
- Git速成学习第三课:创建与合并分支
本来第三课想记录一下远程仓库的创建与克隆0.0但是想了想还是不写了. 这里写一下分支管理中的创建与合并. Git速成学习笔记整理于廖雪峰老师的官网网站:https://www.liaoxuefeng. ...
- eduSOHO 首页模板 全部课程模块代码
首页模板文件 设置在后台主题-管理-选中网校课程 然后前台调用代码 {% if code != 'course-grid-with-condition-index' %} {% cach ...