自己做了一个vue的小demo,在开发过程中发现:
编译器终端经常报错类似:
Expected indentation of 4 spaces but found 6
Missing space before function parentheses
但页面会正常显示,如图
vue报错Expected indentation of 4 spaces but found 6,Missing space before function parentheses
检查发现是在初始化的时候默认安装了ESLint(代码检测工具,统一代码风格),解决方案是

1.找到bulid/webpack.base.conf.js文件;
2.找到module对象;
3.找到rules注释掉其中的 …(config.dev.useEslint ? [createLintingRule()] : [])
vue报错Expected indentation of 4 spaces but found 6,Missing space before function parentheses
4.然后重启服务即可
vue报错Expected indentation of 4 spaces but found 6,Missing space before function parentheses

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-12-21
  • 2021-06-17
  • 2022-03-06
  • 2022-01-03
  • 2021-07-29
猜你喜欢
  • 2021-12-22
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2022-01-19
  • 2022-12-23
相关资源
相似解决方案