1、There are multiple modules with names that only differ in casing.
1、编译环境
VSCode,@vue/cli 4.5.11。
2、问题描述
按照网上课程的讲解进行学习,在学到基于脚手架编写项目入门的时候,遇到下面这种问题:
There are multiple modules with names that only differ in casing.
3、解决
经过查看,是组件名字写错导致的。在vue-demo/src/App.vue
路径中导入组件名为Hello.vue
:
import Hello from "./components/Hello.vue"
在vue-demo/src/router/index.js
路径中导入组件名为hello.vue
:
import Hello from '@/components/hello.vue'
因此,将两个组件名和项目中的组件名改成一致即可。
2、高效工具
1、查找快捷键
命令 | 描述 |
---|---|
Ctrl+P | 查找 |