WARN: Using Node.js version 18 to execute analysis is not supported. Please upgrade to a newer LTS v

Hi,

We’re encountering a SonarQube error related to the unsupported Node.js version 18. We’re using the latest sonar-scanner-cli Docker image and SonarQube Community Build: 25.1.0.102122.

I have checked the latest sonar-scanner-cli Docker image, and it appears that it comes with Node.js version 18, which will reach end-of-life at the end of next month. Could you please upgrade the default Node.js version to at least v20?

org.sonar.plugins.javascript.nodejs.NodeCommandException: Failed to determine the version of Node.js, exit value 127. Executed: '/builds/<>/.sonar/js/node-runtime/node -v'
	at org.sonar.plugins.javascript.nodejs.NodeVersion.getVersion(NodeVersion.java:57)
	at org.sonar.plugins.javascript.bridge.EmbeddedNode.deploy(EmbeddedNode.java:197)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.deploy(BridgeServerImpl.java:206)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServerLazily(BridgeServerImpl.java:337)
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:70)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:201)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:197)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:170)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:356)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
INFO: Using Node.js executable: 'node'.
INFO: Memory configuration: OS (15802 MB), Node.js (524 MB).
WARN: Using Node.js version 18 to execute analysis is not supported. Please upgrade to a newer LTS version of Node.js: [^20.9.0, ^22.9.0].
WARN: Access to the multi-values/property set property 'sonar.javascript.file.suffixes' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.

Hello Shirwa,

Thank you for your feedback.

The Node.js runtime is not part of the CLI scanner, but is downloaded by it alongside the analyzers from your SonarQube instance.
The JS/TS/CSS analyzer bundled with SQ 25.1.0.102122 holds a Node.js runtime v22.11.0.

The analyzer has some logic to decide whether it can use the bundled runtime, or if it falls back to the one available on the host machine.
Could you share more logs so that we can see which path it took and where did it pick up that Node.js 18?