使用 java 21 构建 Vaadin 24 流应用程序无法构建,并出现版本“GLIBC_2.27”未找到错误

问题描述 投票:0回答:1

将我的 Vaadin 流应用程序升级到 Java 21 导致 CI/CD 构建失败。据我所知,当

vaadin-maven-plugin
尝试安装节点时会出现问题:

  • Spring Boot 3.3.3
  • java 21(使用
    maven:3-amazoncorretto-21
    构建)
  • 瓦丁 24.0.5

从日志来看,它似乎在此位置正确安装了节点/root/.vaadin/node/bin/node

然后,插件似乎通过检查错误的目录来验证安装(这只是我的假设):找不到版本 GLIBC_2.27'(/root/.vaadin/node/node 需要)

[INFO] Unpacking /root/.vaadin/node-v18.14.1-linux-x64.tar.gz (43977325 bytes) into /root/.vaadin/node/tmp
[INFO] Copying node binary from /root/.vaadin/node/tmp/node-v18.14.1-linux-x64/bin/node to /root/.vaadin/node/bin/node
[INFO] Extracting npm
[INFO] Local node installation successful.
[WARNING] Error checking if node is new enough
com.vaadin.flow.server.frontend.FrontendUtils$UnknownVersionException: Unable to detect version of node. Using command /root/.vaadin/node/node --version
    at com.vaadin.flow.server.frontend.FrontendUtils.getVersion (FrontendUtils.java:843)
    at com.vaadin.flow.server.frontend.FrontendTools.getNodeVersionAndExecutable (FrontendTools.java:673)
    at com.vaadin.flow.server.frontend.FrontendTools.validateNodeAndNpmVersion (FrontendTools.java:628)
    at com.vaadin.flow.plugin.base.BuildFrontendUtil.prepareFrontend (BuildFrontendUtil.java:143)
    at com.vaadin.flow.plugin.maven.PrepareFrontendMojo.execute (PrepareFrontendMojo.java:64)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
   
    [...]

Caused by: com.vaadin.flow.server.frontend.FrontendUtils$CommandExecutionException: Process execution failed with exit code 1
Output: 
Error output: /root/.vaadin/node/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /root/.vaadin/node/node)
/root/.vaadin/node/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /root/.vaadin/node/node)
    at com.vaadin.flow.server.frontend.FrontendUtils.executeCommand (FrontendUtils.java:878)
    at com.vaadin.flow.server.frontend.FrontendUtils.getVersion (FrontendUtils.java:840)
    at com.vaadin.flow.server.frontend.FrontendTools.getNodeVersionAndExecutable (FrontendTools.java:673)
    at com.vaadin.flow.server.frontend.FrontendTools.validateNodeAndNpmVersion (FrontendTools.java:628)
    at com.vaadin.flow.plugin.base.BuildFrontendUtil.prepareFrontend (BuildFrontendUtil.java:143)

   [...]

    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[ERROR] Command '[/root/.vaadin/node/node, -v]' failed with exit code '1'

node.js vaadin vaadin-flow java-21
1个回答
0
投票

这个问题似乎是由于升级到Java 21时更改基础镜像引起的。将其更改为

maven:3.9.6-eclipse-temurin-21
后解决了我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.