eslint Cannot read property 'range' of null错误

手动添加的配置,2个项目OK,还个项目 运行报错

Cannot read property ‘range‘ of null
TypeError: Cannot read property ‘range‘ of null
    at SourceCode.getTokenBefore (/Users/jason/my-project/node_modules/eslint/lib/token-store/index.js:303:17)
    at checkSpacingBefore (/Users/jason/my-project/node_modules/eslint/lib/rules/template-curly-spacing.js:51:42)
    at TemplateElement (/Users/jason/my-project/node_modules/eslint/lib/rules/template-curly-spacing.js:116:17)
    at listeners.(anonymous function).forEach.listener (/Users/jason/my-project/node_modules/eslint/lib/util/safe-emitter.js:47:58)

3个项目eslint的配置包都是相同版本,最后这个报错的解决方案是将

"babel-eslint": "^8.2.1", 改为 "babel-eslint": "8.0.1",

重新install后能正常跑起来了.

eslint Cannot read property 'range' of null错误

原文地址:https://www.cnblogs.com/ryans/p/8411298.html

时间: 2024-08-10 19:54:18

eslint Cannot read property 'range' of null错误的相关文章

eslint Cannot read property 'range' of null错误( Quasar Doc )$ quasar dev 出错

手动添加的配置,2个项目OK,还个项目 运行报错 Cannot read property 'range' of null TypeError: Cannot read property 'range' of null at SourceCode.getTokenBefore (/Users/jason/my-project/node_modules/eslint/lib/token-store/index.js:303:17) at checkSpacingBefore (/Users/jas

TypeError: Cannot red property 'style' of null 错误解决

错误信息如下: JSP代码如下: <c:if test ="${not empty excelErrors}"> <div id="excelErrorDiv" class="acxiom-content-container closed rounded vpad top-buffer" style="width:90%;margin-left:5%;"> <div class="acx

webapi使用swagger出现“Cannot read property &#39;parameters&#39; of null”

前端时间在webapi项目使用swagger来提供接口文档及测试工具,按网上方法(http://wmpratt.com/swagger-and-asp-net-web-api-part-1)配置好之后在浏览器控制台出现"Cannot read property 'parameters' of null"错误. 后面发现问题出在//localhost:5645/swagger/docs/v1这个JSON资源上面,序列化出来的JSON,包含了为NULL的字段,导致swagger-ui-mi

js错误Cannot set property &#39;action&#39; of null

Cannot set property 'action' of null [自己解决问题答案] 应该放到form里面 [网上答案]是页面无法加载完毕执行代码.可以把获取元素等一系列的操作放在 window.onload=function(){} 中 ,或者尝试把js放在页面最底部看错误,应该是未找到元素. js错误Cannot set property 'action' of null

百度ueditor 实例化 Cannot set property &#39;innerHTML&#39; of null 完美解决方案

此时此刻,我正在用博客园推荐的TinyMCE编辑器写这个博客,突然想起最近在项目中使用百度ueditor编辑器中的一些经历.所以记录在此,与大家分享. 不得不说,百度ueditor是一款很好的在线编辑器,为开发者提供了诸多便利,你甚至可以用它来把word文档的内容按照一定的格式转换成html代码,然后再放进自己的项目中. 1.我们的项目中,用户在注册时有可能需要查看用户协议和隐私协议,而我们的文案是将这两个协议的内容放在word文档中,作为苦逼的开发人员,你需要把这些文字展示在html页面上,并

org.hibernate.PropertyValueException: not-null property references a null or transient value: model.

今天在写一个SSH整合的项目时,首先将数据库操作部分单独分离出来,写完后使用Junit进行测试,经过测试,发现没有任何问题,对数据库中的内容进行增删改查没有问题,但是将他整合到SSH的项目中时,报出了这么一个错误org.hibernate.PropertyValueException: not-null property references a null or transient value: model.TransactionRecord.remark.当时很是费解,因为当时当时在Junit

Extjs4---Cannot read property &#39;addCls&#39; of null

用Extjs4 MVC做后台管理系统时,通过点击左边导航菜单往tabpanel添加tab,然后关闭再打开某个tab,结果tabpanel不能显示tab,系统页面处于崩溃状态,并且浏览器报错Cannot read property 'addCls' of null. 经分析查阅网上资料得知,原因是:定义grid的时候添加序号这行代码:new Ext.grid.RowNumberer()引起的.如果没有这样代码,系统运行正常. 当用Extjs创建(create)一个window,panel时,或者就

Uncaught TypeError: Cannot set property &#39;innerHTML&#39; of null

学习Chrome插件时,要在弹出页面中显示当前时间,结果怎样也显示不出来 看了 http://www.cnblogs.com/mfryf/p/3701801.html 这篇文章后感悟颇深 通过调试发现在js中的一段代码没有执行到,报以下错误 Uncaught TypeError: Cannot set property 'innerHTML' of null  然后查询该错误原因,结果是因为js引用放在了页面的头部,在修改 innerHTML 属性时找不到该属性,因为需要修改一个html标签中的

Uncaught TypeError: Cannot read property &#39;ownerDocument&#39; of null

/********************************************************************* * Uncaught TypeError: Cannot read property 'ownerDocument' of null * 说明: * 尝试将SVG文件内容通过JS Ajax加载,然后动态插入div中,报这个错误, * 解决办法,直接将svg后缀改成html,就可以了. * * 2017-8-25 深圳 龙华樟坑村 曾剑锋 *********