首页 > 其他 > 详细

eslint Cannot read property 'range' of null错误

时间:2018-02-04 10:50:31      阅读:578      评论:0      收藏:0      [点我收藏+]

手动添加的配置,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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!