【原创】 eslint+vue开发项目,编译错误问题解决
栏目:前端/PS  作者:  阅读:(2532)

eslint+vue开发项目,编译错误问题解决

    最近,自己在开发一个项目,采用eslint+vue开发,因为本身对前端项目接触少,所以遇到问题解决起来有点棘手。起初找了网上一些资料,都没能解决。后来请教了公司专业做前端开发的,说可能是版本冲突导致的。然后,我就从版本冲突方面查资料。

    因为,我本地的eslint采用10.*版本开发,后来查了官方的GitHub,还有一些博客。总结一下,就两种方式解决:一种是降版本;一种是改变按照10.*版本写法改代码(我倾向于后者)。

    第一种:降版本方法,就是将eslint从10.*版本,降到7.*或者8.*。这种解决办法,相关博文:

1、Module build failed (from ./node_modules/eslint-loader/index.js):Module build failed (from ./node_modules/eslint-loader/index.js)

2、解决vue报错:Modulebuildfailed(from.node_modules_e。。。:解决vue报错:Modulebuildfailed(from.node_modules_e。。。

3、[Bug Report/Feeback] TypeError: Cannot read property 'range' of null #249:[Bug Report/Feeback] TypeError: Cannot read property 'range' of null #249

     第二种:按照10.*版本的写法改代码。这种解决办法,相关博文:

1、babel报错处理【升级方案】:babel报错处理【升级方案】

2、Cannot read property 'range' of null #681:Cannot read property 'range' of null #681

3、eslint 版本 导致 Cannot read property 'range' of null 错误 #346:eslint 版本 导致 Cannot read property 'range' of null 错误 #346

4、解决Cannot read property 'range' of null 错误:解决Cannot read property 'range' of null 错误

5、component: resolve => require(['../pages/home.vue'], resolve),:component: resolve => require(['../pages/home.vue'], resolve),




下一篇: 温病研究...



昵称
邮箱
域名
  通知博主
验证码

  随机文章