[英]Critical dependency: the request of a dependency is an expression webpack svelte
[英]Webpack not properly compiling (Critical dependency: the request of a dependency is an expression)
我已經為這個問題苦苦掙扎了幾天,但我無法確定問題到底出在哪里。 基本上,困擾我的是以下警告: WARNING in ./node_modules/colors/lib/colors.js 141:29-43 Critical dependency: the request of a dependency is an expression
。 它導致我的應用崩潰/無法正常工作。
我可以通過在其中添加一行來使其他錯誤消失(例如ERROR in ./config/internals/environmentVars.js Module not found: Error: Can't resolve 'fs' in '/app/config/internals'
)我的webpack配置,但我不能擺脫第一個。 對此主題的任何幫助將不勝感激! 如果需要,我可以為您提供更多代碼。
我在編譯節點應用程序時遇到了同樣的問題。 解決了將webpack.config文件中的目標選項放置的問題 。
target: 'node'
希望這可以幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.