项目场景:

今天早上运行Vue项目的时候需要在一个组件里面引入两个组件的模板,这时报错。


问题描述:

在这里插入图片描述

warning  in ./src/components/SideBar.vue

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:
* C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\babel-loader\lib\index.js!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\vue-loader\lib\selector.js?type=script&index=0!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\src\components\SideBar.vue
    Used by 2 module(s), i. e.
    C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\vue-loader\index.js??ref--0!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\src\components\SideBar.vue
* C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\babel-loader\lib\index.js!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\vue-loader\lib\selector.js?type=script&index=0!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\src\components\Sidebar.vue
    Used by 2 module(s), i. e.
    C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\vue-loader\index.js??ref--0!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\src\components\Sidebar.vue

 warning  in ./src/components/SideBar.vue

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:
* C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\vue-loader\index.js??ref--0!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\src\components\SideBar.vue
    Used by 1 module(s), i. e.
    C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\babel-loader\lib\index.js!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\vue-loader\lib\selector.js?type=script&index=0!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\src\components\Home.vue
* C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\vue-loader\index.js??ref--0!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\src\components\Sidebar.vue
    Used by 1 module(s), i. e.
    C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\node_modules\babel-loader\lib\index.js!C:\Users\Administrator\Desktop\vscode\第五周\Day17\day17\src\router\index.js
        }

解决方案:

此类问题通常是router 里面的

index.js 的文件 引入组件的时候 单词写错了,注意一下组件的大小写就好了。在这里插入图片描述

改成即可
即可。

Logo

前往低代码交流专区

更多推荐