npm run dev 啟動項目后,出現編譯警告 Compiled with 2 warnings


運行npm run dev 啟動項目后,出現如下 Warning

[2019-06-05T17:13:16.265] [INFO] - WARNING Compiled with 2 warnings
              17:13:16
[2019-06-05T17:13:16.265] [INFO] -
[2019-06-05T17:13:16.268] [INFO] - warning in ./node_modules/es6-promise/dist/es6-promise.js
[2019-06-05T17:13:16.268] [INFO] -
[2019-06-05T17:13:16.269] [INFO] - 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:
* E:\RAIS\rais-project\node_modules\es6-promise\dist\es6-promise.js
Used by 11 module(s), i. e.
E:\RAIS\rais-project\node_modules\babel-polyfill\node_modules\regenerator-runtime\runtime.js
* e:\RAIS\rais-project\node_modules\es6-promise\dist\es6-promise.js
Used by 1 module(s), i. e.
e:\RAIS\rais-project\node_modules\_@ckeditor_ckeditor5-build-classic@12.1.0@@ckeditor\ckeditor5-build-classic\build\ckeditor.js
[2019-06-05T17:13:16.269] [INFO] -
[2019-06-05T17:13:16.270] [INFO] - warning in ./node_modules/process/browser.js
[2019-06-05T17:13:16.270] [INFO] -
[2019-06-05T17:13:16.271] [INFO] - 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:
* E:\RAIS\rais-project\node_modules\process\browser.js
Used by 13 module(s), i. e.
E:\RAIS\rais-project\node_modules\vue-localstorage\dist\vue-local-storage.js
* e:\RAIS\rais-project\node_modules\process\browser.js
Used by 1 module(s), i. e.
e:\RAIS\rais-project\node_modules\es6-promise\dist\es6-promise.js

問題原因:

windows下盤符的大小寫導致的。

實際上,上面顯示的警告,是指引用文件的時候大小寫錯了,有時候是盤符,有時候是引入文件的時候插件名

我打開VS Code 在cmd里運行的時候,自動定位到項目地址,盤符是大寫,改成小寫的e盤符就沒問題了。

 

Be patient, and work hard!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM