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

Posted mouseleo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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/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后能正常跑起来了.
 
package.json

以上是关于eslint Cannot read property 'range' of null错误( Quasar Doc )$ quasar dev 出错的主要内容,如果未能解决你的问题,请参考以下文章

报错TypeError: Cannot read property 'range' of null

vue工程npm run serve时启动报:Cannot read property 'range' of null 错误

a biped was detected but cannot be configured properly (Bipe导入Unity 无法正确识别)

[shiro] Wildcard string cannot be null or empty. Make sure permission strings are properly formatted

ShiroWildcard string cannot be null or empty. Make sure permission strings are properly formatted

ShiroWildcard string cannot be null or empty. Make sure permission strings are properly formatted(代码