【Vue Error】 error Component name “product” should always be multi-word vue/multi-word-compone……
The error is as follows:
Analysis problem:
It can be seen from the translation that there is a problem with the component name, which means that the component name should be composed of multiple words spliced with horizontal lines.
After consulting the data, it is found that this is actually when the syntax check is performed, the non-standard code (that is, the naming is not standard) is regarded as an error.
Solve the problem:
Modify configuration items, turn off syntax checking
The root directory of the project finds vue.config.js
the file
Add configuration: lintOnSave:false
, the effect is to turn off syntax checking
const {
defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave:false,//关闭语法检查
})
Save and run the project to solve it successfully.