今天在開發一個新項目時,當安裝完依賴包啟動項目后報了一個這個錯
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
谷歌翻譯一下:
有多個模塊的名稱僅在大小寫上有所不同。
在具有其他區分大小寫的文件系統上編譯時,這可能導致意外行為。
使用相等的套管。 比較這些模塊標識符
----------------------------------------
這大概意思就是哪里大小寫沒有寫的精確
再仔細看一下報錯信息
warning in ./src/modules/screen/views/ArrivalView.vue?vue&type=script&lang=js&
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:
* G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\babel-loader\lib\index.js?cacheDirectory!G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\vue-loader\lib\index.js??vue-loader-options!G:\AsiaInfo\tianjin\iscreen-datav-web\src\modules\screen\views\ArrivalView.vue?vue&type=script&lang=js&
Used by 4 module(s), i. e.
G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\vue-loader\lib\loaders\pitcher.js??ref--4!G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\babel-loader\lib\index.js?cacheDirectory!G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\vue-loader\lib\index.js??vue-loader-options!G:\AsiaInfo\tianjin\iscreen-datav-web\src\modules\screen\views\ArrivalView.vue?vue&type=script&lang=js&
* G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\babel-loader\lib\index.js?cacheDirectory!G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\vue-loader\lib\index.js??vue-loader-options!G:\AsiaInfo\tianjin\iscreen-datav-web\src\modules\screen\views\arrivalView.vue?vue&type=script&lang=js&
Used by 4 module(s), i. e.
G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\vue-loader\lib\loaders\pitcher.js??ref--4!G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\babel-loader\lib\index.js?cacheDirectory!G:\AsiaInfo\tianjin\iscreen-datav-web\node_modules\vue-loader\lib\index.js??vue-loader-options!G:\AsiaInfo\tianjin\iscreen-datav-web\src\modules\screen\views\arrivalView.vue?vue&type=script&lang=js&
初步判斷就是ArrivalView.vue這個文件在引用時估計大小寫沒寫好
來全局搜一下↓
果然這里有引用ArrivalView.vue時沒有區分大小寫
當我將a改成大寫后,成功啟動好了,good!