【解决】 ERROR Failed to compile with 1 error Syntax Error: TypeError: eslint.CLIEng

743 阅读1分钟

本文已参与「新人创作礼」活动,一起开启掘金创作之路。

【解决】 ERROR Failed to compile with 1 error
Syntax Error: TypeError: eslint.CLIEngine is not a constructor 解决!

You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file.在这里插入图片描述

有用的话麻烦点个赞,谢谢啦!^v^

方式一:打开package.json将以下代码删除重新运行(将项目停掉,重新npm run serve)

在这里插入图片描述 删除后本项目的eslint语法校验会失效,即可运行成功(需重新npm run serve) 在这里插入图片描述

方式二:打开vue.config.js加入以下代码

在这里插入图片描述