在做前端项目的时候,发现控制台有警告提示,如图所示:
大概提示的内容就是:
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
有多个模块的名称仅在外壳上不同。
这可能导致在具有其他大小写语义的文件系统上编译时出现意外行为。
用平等的套管。比较这些模块标识符:
主要原因就是路径大小写、或者文件、文件名大小写错乱, 如: ImportInfo 的写成 importInfo
在linux严格区分大小写,而windows不区分
解决方式:
- 根据提示内容,找到对应的文件,观察其大小是否匹配
如上图提示:
如图红色线框选的路径 ./src/views/systemManagement/DocumentTemplateManagement/index.vue
其实我真实的文件夹应该是 documentTemplateManagement
这里由于 DocumentTemplateManagement 开头大写了,改成 documentTemplateManagement 即解决。