vue引入组件报错: 可以正常运行,但是编辑器红了
Already included file name ‘d:/text/正课/50期/vue/project/project2 copy/src/components/Count.vue’ differs from file name ‘d:/text/正课/50期/vue/project/project2 copy/src/components/count.vue’ only in casing.
The file is in the program because:
Imported via ‘./components/Count.vue’ from file ‘d:/text/正课/50期/vue/project/project2 copy/src/App.vue’
Root file specified for compilation
Root file specified for compilationVetur(1261)
百度翻译:
已经包含的文件名“d:/text/正课/50期/vue/project/project2 copy/src/components/Count.vue”与文件名“d:/text/正课/50期/vue/project/project/project2 copy/src/components/count.vue”仅在大小写中不同。
该文件位于程序中,因为:
通过“./components/Count.vue”从文件“d:/text/正课/50期/vue/project/project2 copy/src/App.vue”导入
指定用于编译的根文件
指定用于编译的根文件Vetur(1261)
解决方法:
- 给组件改名
- 去掉后缀.vue