在 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'
但是我在前端文件夹中没有使用/导入这个 babel-loader 的东西。
我尝试使用 Vaadin 14.5.3 和 14.6.8
两者都给了我相同的结果。
最佳答案
由于这个问题还没有出现,我们需要调查为什么 NPM 7.20.6 会像这样影响构建。
作为解决方法,您应该将配置 block 添加到 vaadin-plugin 中:
<configuration>
<requireHomeNodeExec>true</requireHomeNodeExec>
</configuration>
这会强制使用已知可用的框架安装版本。 可以找到有关 maven 插件目标的更多文档 here
关于npm - 更新到 npm 7.20.6 后,Vaadin 14 应用程序无法构建前端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68805717/