kyb*_*org 3 vaadin npm webpack vaadin14
npm 更新到 7.20.6 后,我无法再构建我的 Vaadin 应用程序。
它给出以下错误:
Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.
Hash: 4deef033da9d3a9fa458
Version: webpack 4.42.0
Time: 31ms
Built at: 08/16/2021 5:02:34 PM
ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in '/srv/github/***/yalsee/_work/yalsee/yalsee/frontend'
ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in '/srv/github/***/yalsee/_work/yalsee/yalsee/frontend'
Run Code Online (Sandbox Code Playgroud)
但我没有在前端文件夹中使用/导入这个 babel-loader 。
我尝试使用 Vaadin 14.5.3 和 14.6.8
两者都给了我相同的结果。
由于这个问题尚未出现,我们需要调查为什么 NPM 7.20.6 会对构建产生这样的影响。
作为解决方法,您应该将配置块添加到 vaadin-plugin:
<configuration>
<requireHomeNodeExec>true</requireHomeNodeExec>
</configuration>
Run Code Online (Sandbox Code Playgroud)
这强制使用已知可以工作的框架安装版本。有关 Maven 插件目标的更多文档可以在这里找到