Vue中vue-cil編譯報錯

npm run serve的時候出現錯誤

 

 warning  in (webpack)/buildin/global.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:

(有多個模塊的名稱僅在大小寫上有所不同。在具有其他區分大小寫的文件系統上編譯時,這可能導致意外行爲)

* ****\node_modules\webpack\buildin\global.js
    Used by 2 module(s), i. e.
   ****\node_modules\sockjs-client\dist\sockjs.js

 

百度說是node-modules中的包刪除後重裝就行,沒試。

google到github上說是路徑原因,大小寫沒有區分而產生的錯誤。

(原文鏈接點擊藍字)

然後回頭看了下,確實在vs code中我cd 的路徑是小寫路徑,但是我的文件夾是大寫的,cd的時候偷懶了,vs code進來之後同樣是小寫路徑,然後編譯就報錯了,重新cd ../   到根目錄,然後重新cd到子目錄,注意文件夾命名大小寫,重新編譯,就沒報錯了。

github上有提到另一種思路是直接在cmd中cd到子目錄,然後npm run serve,。試了下,發現是cmd會糾正路徑的大小寫。。。。

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章