SonarQube 25.5: [ERROR] Error when running: 'node -v'

I am having the exact same problem after upgrading from 9.7.
The Jenkins worker node is Amazon Linux 2023 which is compatible with Node 20 and has Node 18.18 installed.

  • which versions are you using - * Community Build v25.5.0.107428
  • Sonarscanner in an Amazon Linux 2023 Jenkins worker node
  • how is SonarQube deployed: EKS using HELM
  • what are you trying to achieve - Running sonarscanner from Jenkins
2025-06-02T09:29:45.847Z] [INFO] Deploy location /home/ec2-user/.sonar/js/node-runtime, tagetRuntime: /home/ec2-user/.sonar/js/node-runtime/node,  version: /home/ec2-user/.sonar/js/node-runtime/version.txt
[2025-06-02T09:30:00.761Z] [ERROR] /home/ec2-user/.sonar/js/node-runtime/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /home/ec2-user/.sonar/js/node-runtime/node)
[2025-06-02T09:30:00.761Z] [ERROR] /home/ec2-user/.sonar/js/node-runtime/node: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /home/ec2-user/.sonar/js/node-runtime/node)
[2025-06-02T09:30:00.761Z] [ERROR] /home/ec2-user/.sonar/js/node-runtime/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /home/ec2-user/.sonar/js/node-runtime/node)
[2025-06-02T09:30:00.761Z] [WARNING] Embedded Node.js failed to deploy in /home/ec2-user/.sonar.
[2025-06-02T09:30:00.761Z] You can change the location by setting the option `sonar.userHome` or the environment variable `SONAR_USER_HOME`.
[2025-06-02T09:30:00.761Z] Otherwise, it will default to /home/ec2-user/.sonar/js/node-runtime.
[2025-06-02T09:30:00.761Z] Will fallback to host Node.js.
[2025-06-02T09:30:00.761Z] org.sonar.plugins.javascript.nodejs.NodeCommandException: Failed to determine the version of Node.js, exit value 1. Executed: '/home/ec2-user/.sonar/js/node-runtime/node -v'
[2025-06-02T09:30:00.761Z] 	at org.sonar.plugins.javascript.nodejs.NodeVersion.getVersion(NodeVersion.java:57)
[2025-06-02T09:30:00.761Z] 	at org.sonar.plugins.javascript.bridge.EmbeddedNode.deploy(EmbeddedNode.java:200)
[2025-06-02T09:30:00.761Z] 	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.deploy(BridgeServerImpl.java:207)
[2025-06-02T09:30:00.761Z] 	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServerLazily(BridgeServerImpl.java:320)
[2025-06-02T09:30:00.761Z] 	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:69)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
[2025-06-02T09:30:00.761Z] 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
[2025-06-02T09:30:00.761Z] 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:212)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:208)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:205)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:205)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:178)
[2025-06-02T09:30:00.761Z] 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
[2025-06-02T09:30:00.761Z] 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:339)
[2025-06-02T09:30:00.761Z] 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
[2025-06-02T09:30:00.761Z] 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
[2025-06-02T09:30:00.761Z] 	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
[2025-06-02T09:30:00.761Z] 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
[2025-06-02T09:30:00.761Z] 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
[2025-06-02T09:30:00.761Z] 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
[2025-06-02T09:30:00.761Z] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
[2025-06-02T09:30:00.761Z] 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[2025-06-02T09:30:00.761Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2025-06-02T09:30:00.761Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2025-06-02T09:30:00.761Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2025-06-02T09:30:00.761Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
[2025-06-02T09:30:00.761Z] 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[2025-06-02T09:30:00.761Z] 	at jdk.proxy4/jdk.proxy4.$Proxy30.execute(Unknown Source)
[2025-06-02T09:30:00.761Z] 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[2025-06-02T09:30:00.762Z] 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[2025-06-02T09:30:00.762Z] 	at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:65)
[2025-06-02T09:30:00.762Z] 	at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:108)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)
[2025-06-02T09:30:00.762Z] 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)
[2025-06-02T09:30:00.762Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2025-06-02T09:30:00.762Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2025-06-02T09:30:00.762Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2025-06-02T09:30:00.762Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
[2025-06-02T09:30:00.762Z] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
[2025-06-02T09:30:00.762Z] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
[2025-06-02T09:30:00.762Z] 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
[2025-06-02T09:30:00.762Z] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
[2025-06-02T09:30:00.762Z] 
[2025-06-02T09:30:00.762Z] [INFO] Using Node.js executable: 'node'.
[2025-06-02T09:30:00.762Z] [ERROR] Error when running: 'node -v'. Is Node.js available during analysis?
[2025-06-02T09:30:00.762Z] org.sonar.plugins.javascript.nodejs.NodeCommandException: Error when running: 'node -v'. Is Node.js available during analysis?

I guess the issue is here:

The scanner says it will fallback to the version of NodeJS installed on the runner, but then… tries to use the version of NodeJS it just failed to deploy.

I’ve flagged this for attention from our the team.

You may be able to override the behavior by setting sonar.nodejs.executable to the path of NodeJS on your runner.

Hi @Colin and @manuel_marquez,

Thank you for bringing this up. Indeed, we should handle the failure cases better.
@manuel_marquez - seems like your worker doesn’t have the proper libraries to run the embedded node. As @Colin explained, you can provide a path to your own node executable with the sonar.nodejs.executable and provide a node version >=20 and it should work. Here are the docs: JavaScript, TypeScript, CSS | SonarQube Server Documentation

From our side, we should be more graceful in handling the failure case. I’ve created a ticket to improve this: Jira

Kind regards,
Michal

2 Likes