Vue检测报错Module Error (from ./node_modules/eslint-loader/index.js):

Failed to compile.

./src/App.vue
Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\86183\Desktop\JY26Q\移动端\toutiao-m\src\App.vue
18:1 error Expected indentation of 2 spaces but found 0 indent
18:6 error Missing space before value for key ‘name’ key-spacing
24:9 error Newline required at end of file but not found eol-last

✖ 3 problems (3 errors, 0 warnings)
3 errors and 0 warnings potentially fixable with the --fix option.
原因:
ESlint代码检测问题
解决方案:
在根目录创建vue.config.js文件
在文件内关闭检测

module.exports = {
    lintOnSave: false
}

你可能感兴趣的:(vue报错)