ERROR in [eslint] E:\vue_test\my-project\src\components\Footer\Footer.vue 1:1 error Component name "Footer" should always be multi-word vue/multi-word-component-names
时间: 2023-07-21 14:18:34 浏览: 55
这是一个ESLint的错误提示,它是在检查你的Vue组件名称是否符合规范。
根据Vue的官方文档,单词组件名在使用时会出现一些问题,例如无法正确的识别大小写,以及在使用时可能会与HTML元素名称发生冲突,因此Vue推荐使用多个单词组成的组件名。
解决这个问题的方法很简单,只需要将组件名改为多个单词组成即可。例如将组件名 "Footer" 改为 "MyFooter" 或者 "PageFooter" 等。这样就可以避免这个错误提示了。
相关问题
D:\vuejsqimo\devtools-5.1.1\vue_shop\src\components\HelloWorld.vue 16:8 error Parsing error: nested-comment vue/no-parsing-error ✖ 1 problem (1 error, 0 warnings) 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. error in ./src/lib/mui/css/icons-extra.css Module not found: Error: Can't resolve '../fonts/mui-icons-extra.ttf' in 'D:\vuejsqimo\devtools-5.1.1\vue_shop\src\lib\mui\css' ERROR in ./src/lib/mui/css/icons-extra.css (./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./src/lib/mui/css/icons-extra.css) 5:36-92 Module not found: Error: Can't resolve '../fonts/mui-icons-extra.ttf' in 'D:\vuejsqimo\devtools-5.1.1\vue_shop\src\lib\mui\css' @ ./src/lib/mui/css/icons-extra.css 4:14-194 15:3-20:5 16:22-202 @ ./src/main.js 6:0-39 ERROR in [eslint] D:\vuejsqimo\devtools-5.1.1\vue_shop\src\components\HelloWorld.vue 16:8 error Parsing error: nested-comment vue/no-parsing-error ✖ 1 problem (1 error, 0 warnings) webpack compiled with 2 errors
As mentioned before, you have two issues in your code.
The first error is related to a missing module in the icons-extra.css file. It seems like the file is trying to import a font file '../fonts/mui-icons-extra.ttf' but it can't find it. You may need to check your file structure and make sure the font file exists in the correct location.
The second error is related to a parsing error in the HelloWorld.vue file. It seems like there is a nested comment or some other syntax issue that is causing the parser to fail. You may need to review the code in that file and make sure all syntax and comments are properly formatted.
You can 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. However, it's important to note that disabling warnings should be done with caution as it can lead to missed errors or bad practices.
Module not found: Error: Can't resolve './router' in 'E:\Vue_Graduation_project\graduation_project\src\views'
这个错误通常发生在 Vue.js 项目中,表示在 `E:\Vue_Graduation_project\graduation_project\src\views` 目录下找不到名为 `router` 的文件。
可能有以下原因:
1. 没有安装 Vue Router:请确保你已经正确安装了 Vue Router,可以通过运行 `npm install vue-router` 或 `yarn add vue-router` 来安装。
2. 没有创建 `router.js` 文件:请确保你已经在 `E:\Vue_Graduation_project\graduation_project\src` 目录下创建了名为 `router.js` 的文件,并且在该文件中正确配置了路由。
3. 文件路径错误:请检查你的文件路径是否正确,尤其是文件名是否正确拼写。
如果以上方法都没有解决问题,你可以提供更多的细节或代码,这样我就可以更好地帮助你解决问题。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)