[英]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.