Javascript plugin version 11 seems to be broken

Since javascript plugin version 11.0.0.33655 all our Sonar analysis are failing with error:

07:30:09.240 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Analysis of JS/TS files failed
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:100)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:68)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:190)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:186)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:157)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	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)
Caused by: java.util.concurrent.CompletionException: java.lang.RuntimeException: Received error from bridge: {"code":"GENERAL_ERROR","message":"Cannot read properties of undefined (reading 'replace')","stack":"TypeError: Cannot read properties of undefined (reading 'replace')\n    at iN (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2104:3901)\n    at Rvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:232556)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async _Qf (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:232814)\n    at async Lvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:233004)\n    at async zvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:235709)\n    at async BCe (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:238370)\n    at async MessagePort.<anonymous> (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:242240)"}
	at java.base/java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:413)
	at java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2118)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeProject(BridgeServerImpl.java:427)
	at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:119)
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:75)
	... 33 more
Caused by: java.lang.RuntimeException: Received error from bridge: {"code":"GENERAL_ERROR","message":"Cannot read properties of undefined (reading 'replace')","stack":"TypeError: Cannot read properties of undefined (reading 'replace')\n    at iN (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2104:3901)\n    at Rvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:232556)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async _Qf (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:232814)\n    at async Lvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:233004)\n    at async zvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:235709)\n    at async BCe (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:238370)\n    at async MessagePort.<anonymous> (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:242240)"}
	at org.sonar.plugins.javascript.bridge.JSWebSocketClient.handleError(JSWebSocketClient.java:86)
	at org.sonar.plugins.javascript.bridge.JSWebSocketClient.onMessage(JSWebSocketClient.java:71)
	at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:661)
	at org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:986)
	at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:910)
	at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:397)
	at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:229)
	at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:544)
	at java.base/java.lang.Thread.run(Thread.java:833)

Everything was working fine with version 10.24. We can’t find a way to pin older version yet.
We’re running analysis like this:

      if [[ $CI_PIPELINE_SOURCE == "merge_request_event" ]];then
        cmd_args="-Dsonar.pullrequest.key=${CI_MERGE_REQUEST_IID} -Dsonar.pullrequest.base=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} -Dsonar.pullrequest.branch=${CI_COMMIT_REF_NAME}"
      else
        cmd_args="-Dsonar.branch.name=${CI_COMMIT_REF_NAME}"
      fi
      echo "running with mr_args: $cmd_args"
      sonar-scanner -X  $cmd_args

Versions info:

07:27:06.960 INFO: SonarScanner 5.0.1.3006
07:27:06.960 INFO: Java 17.0.8 Alpine (64-bit)
07:27:06.960 INFO: Linux 6.1.141-155.222.amzn2023.x86_64 amd64

The only change from the successful builds seems to be javascript-plugin version.
Now builds for all the branches that were successful before - fail with this error.
Is it possible to pin the plugin version, maybe in sonar-project.properties?
I’ve tried following options which didn’t work:

sonar.plugin.javascript.version=10.24.0.33043
sonar.scanner.javaOpts=-Dorg.sonarsource.javascript:sonar-javascript-plugin:10.24.0.33043

Update of sonar-scanner-cli image version from 5.0.1 to 11.3 seems to be fixing this issue.

Hello @Roman_Mykhailiuk,

can you please share the debug logs with the scanner cli image v5? The error you are getting is due to an old Node.js version (that image contains Node 18), but I would have expected that the Node.js binary included in the JS/TS analyzer to be used (v22).

Cheers,
Victor

Hi Victor!
Sure, here’s relevant logs starting from Javacript analysis stage:

07:30:01.813 INFO: Sensor JavaScript/TypeScript analysis [javascript]
07:30:01.817 DEBUG: Files which didn't change will only be analyzed for taint and architecture rules, other rules will not be executed
07:30:01.818 DEBUG: Deploying custom rules bundle jar:file:/builds/cybellum/psa/.sonar/cache/223807500284f04d1b553f179ef24777/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-noop-1.0.0.tgz to /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules10452328679352996398
07:30:01.831 DEBUG: Deploying custom rules bundle jar:file:/builds/cybellum/psa/.sonar/cache/e84307d9f4320d1fccef426dd326ef62/sonar-architecturejavascriptfrontend-plugin.jar!/js-architecture-frontend-1.0.0.tgz to /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules9357772787359461564
07:30:01.860 DEBUG: Deploying the bridge server into /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle
07:30:01.962 DEBUG: Setting deploy location to /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle
07:30:01.963 INFO: Detected os: Linux arch: amd64 alpine: true. Platform: LINUX_X64_MUSL
07:30:01.963 INFO: Deploy location /builds/cybellum/psa/.sonar/js/node-runtime, tagetRuntime: /builds/cybellum/psa/.sonar/js/node-runtime/node,  version: /builds/cybellum/psa/.sonar/js/node-runtime/version.txt
07:30:01.964 DEBUG: Lock acquired for extraction
07:30:01.967 DEBUG: Extracting embedded node to /builds/cybellum/psa/.sonar/js/node-runtime/node
07:30:04.786 DEBUG: Launching command /builds/cybellum/psa/.sonar/js/node-runtime/node -v
07:30:04.788 ERROR: Error relocating /builds/cybellum/psa/.sonar/js/node-runtime/node: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_replace_coldEPcmPKcmm: symbol not found
07:30:04.792 WARN: Embedded Node.js failed to deploy in /root/.sonar.
You can change the location by setting the option `sonar.userHome` or the environment variable `SONAR_USER_HOME`.
Otherwise, it will default to /builds/cybellum/psa/.sonar/js/node-runtime.
Will fallback to host Node.js.
org.sonar.plugins.javascript.nodejs.NodeCommandException: Failed to determine the version of Node.js, exit value 127. Executed: '/builds/cybellum/psa/.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:200)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.deploy(BridgeServerImpl.java:220)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServerLazily(BridgeServerImpl.java:358)
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:74)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:68)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:190)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:186)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:157)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	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)

07:30:04.792 DEBUG: Starting server
07:30:04.793 DEBUG: Creating Node.js process to start the bridge server on port 34733 
07:30:04.794 INFO: Using Node.js executable: 'node'.
07:30:04.794 DEBUG: Checking Node.js version
07:30:04.794 DEBUG: Launching command node -v
07:30:04.805 DEBUG: Using Node.js v18.17.1.
07:30:04.805 DEBUG: Launching command node /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs 34733 127.0.0.1 false 15000
07:30:06.595 DEBUG: The worker thread is running
07:30:06.596 INFO: Memory configuration: OS (62912 MB), Node.js (4144 MB).
07:30:06.596 DEBUG: Starting the bridge server
07:30:06.607 DEBUG: The bridge server is listening on port 34733
07:30:06.687 DEBUG: Bridge server started on port 34733 in 1895 ms
07:30:06.698 INFO: WebSocket client connected on /ws
07:30:06.698 DEBUG: WebSocket connection opened: ws://127.0.0.1:34733/ws
07:30:06.698 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].
07:30:06.701 INFO: Plugin version: [11.0.0.33655]

Then lots of lines about DEBUG: Cache strategy set to 'WRITE_ONLY' for file ... as the current file is changed.
And then:

07:30:08.384 DEBUG: Setting sources paths to
07:30:08.390 DEBUG: Setting test paths to
07:30:08.391 DEBUG: Setting js/ts exclusions to ...
07:30:08.391 DEBUG: Setting exclusions to ...
07:30:08.391 DEBUG: Setting inclusions to
07:30:08.391 DEBUG: Setting test exclusions to
07:30:08.391 DEBUG: Setting test inclusions to
07:30:08.417 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/react-app-env.d.ts
07:30:08.463 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/Intl.d.ts
07:30:08.467 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/global.d.ts
07:30:08.470 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/notistack.d.ts
07:30:08.500 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/theme.d.ts
07:30:08.583 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/filenamify.d.ts
07:30:08.587 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/react-table-config.d.ts
07:30:08.738 DEBUG: File /builds/cybellum/psa/APIS/Server/scripts/docs/dist_template/public/assets/redoc.standalone-2.0.0-rc.77.js was excluded because it looks like a bundle. (Disable detection with sonar.javascript.detectBundles=false)
07:30:08.739 INFO: Some of the project files were automatically excluded because they looked like generated code. Enable debug logging to see which files were excluded. You can disable bundle detection by setting sonar.javascript.detectBundles=false
07:30:08.760 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/react-copy-html-to-clipboard.d.ts
07:30:08.767 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/react-table-column-resizer.d.ts
07:30:08.775 DEBUG: File /builds/cybellum/psa/documentation/api/docs/assets/redoc.standalone-2.0.0-rc.77.js was excluded because it looks like a bundle. (Disable detection with sonar.javascript.detectBundles=false)
07:30:08.780 DEBUG: File ignored due to js/ts exclusions: /builds/cybellum/psa/FEDashboard/types/i18next.d.ts
07:30:08.893 DEBUG: Clearing dependencies cache
07:30:08.899 ERROR: Error in handler execution
java.lang.RuntimeException: Received error from bridge: {"code":"GENERAL_ERROR","message":"Cannot read properties of undefined (reading 'replace')","stack":"TypeError: Cannot read properties of undefined (reading 'replace')\n    at iN (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2104:3901)\n    at Rvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:232556)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async _Qf (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:232814)\n    at async Lvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:233004)\n    at async zvs (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:235709)\n    at async BCe (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:238370)\n    at async MessagePort.<anonymous> (/builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs:2128:242240)"}
	at org.sonar.plugins.javascript.bridge.JSWebSocketClient.handleError(JSWebSocketClient.java:86)
	at org.sonar.plugins.javascript.bridge.JSWebSocketClient.onMessage(JSWebSocketClient.java:71)
	at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:661)
	at org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:986)
	at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:910)
	at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:397)
	at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:229)
	at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:544)
	at java.base/java.lang.Thread.run(Thread.java:833)

(some lines truncated)

Hi @Roman_Mykhailiuk,

ok, these are the relevant lines:

Our embedded Node.js alpine binary is not binary compatible with the alpine image in v5 (i guess different musl libs) and then it fallback to the host provided node binary (version 18.17) which is too old for the latest release of the analyzer.

So yeah, the fix is to use latest image. Can you please provide the debug logs as well? I wonder if the embedded alpine node binary is now compatible with the host OS in v11 or if we are falling back to host binary (I know latest image includes Node 22, so it should always work).

Cheers,
Victor

Hello,

just want to add that we have also been experiencing this issue in Azure DevOPS pipeline using SonarCloud@3 tasks.

Since “Jul 8, 2025 at 8:09 AM EDT”, all of our pipeline are failing with this error:

java.lang.RuntimeException: Received error from bridge: {“code”:“GENERAL_ERROR”,“message”:“Cannot read properties of undefined (reading ‘replace’)”,“stack”:“TypeError: Cannot read properties of undefined (reading ‘replace’)\n at iN (C:\a\1\.sonarqube\out\.sonar\.sonartmp\bridge-bundle\package\bin\server.cjs:2104:3901)\n at Rvs (C:\a\1\.sonarqube\out\.sonar\.sonartmp\bridge-bundle\package\bin\server.cjs:2128:232556)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _Qf (C:\a\1\.sonarqube\out\.sonar\.sonartmp\bridge-bundle\package\bin\server.cjs:2128:232814)\n at async Lvs (C:\a\1\.sonarqube\out\.sonar\.sonartmp\bridge-bundle\package\bin\server.cjs:2128:233004)\n at async zvs (C:\a\1\.sonarqube\out\.sonar\.sonartmp\bridge-bundle\package\bin\server.cjs:2128:235709)\n at async BCe (C:\a\1\.sonarqube\out\.sonar\.sonartmp\bridge-bundle\package\bin\server.cjs:2128:238370)\n at async MessagePort. (C:\a\1\.sonarqube\out\.sonar\.sonartmp\bridge-bundle\package\bin\server.cjs:2128:242240)”}

I can confirm that this issue appeared when the plugin “JavaScript/TypeScript/CSS Code Quality and Security” version changed from “10.24.0.33043” to “11.0.0.33655”

We were using node 20.10.0.

I tried updating to node 22.17.0, but this caused other errors that may not be related (such as “tsconfig.json files not found”)

Sure, here are debug logs from image 11.3:

10:33:13.469 INFO  Sensor JavaScript/TypeScript analysis [javascript]
10:33:13.472 DEBUG Files which didn't change will only be analyzed for taint and architecture rules, other rules will not be executed
10:33:13.474 DEBUG Deploying custom rules bundle jar:file:/builds/cybellum/psa/.sonar/cache/223807500284f04d1b553f179ef24777/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-noop-1.0.0.tgz to /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules2225569500712206720
10:33:13.485 DEBUG Deploying custom rules bundle jar:file:/builds/cybellum/psa/.sonar/cache/e84307d9f4320d1fccef426dd326ef62/sonar-architecturejavascriptfrontend-plugin.jar!/js-architecture-frontend-1.0.0.tgz to /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules3995246548950628095
10:33:13.520 DEBUG Deploying the bridge server into /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle
10:33:13.636 DEBUG Setting deploy location to /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle
10:33:13.636 INFO  Detected os: Linux arch: amd64 alpine: false. Platform: LINUX_X64
10:33:13.636 INFO  Deploy location /builds/cybellum/psa/.sonar/js/node-runtime, tagetRuntime: /builds/cybellum/psa/.sonar/js/node-runtime/node,  version: /builds/cybellum/psa/.sonar/js/node-runtime/version.txt
10:33:13.637 DEBUG Lock acquired for extraction
10:33:13.640 DEBUG Extracting embedded node to /builds/cybellum/psa/.sonar/js/node-runtime/node
10:33:16.615 DEBUG Launching command /builds/cybellum/psa/.sonar/js/node-runtime/node -v
10:33:16.622 DEBUG Deployed node version v22.16.0
10:33:16.622 DEBUG Starting server
10:33:16.623 DEBUG Creating Node.js process to start the bridge server on port 45655 
10:33:16.624 INFO  Using embedded Node.js runtime.
10:33:16.624 INFO  Using Node.js executable: '/builds/cybellum/psa/.sonar/js/node-runtime/node'.
10:33:16.624 DEBUG Checking Node.js version
10:33:16.624 DEBUG Launching command /builds/cybellum/psa/.sonar/js/node-runtime/node -v
10:33:16.632 DEBUG Using Node.js v22.16.0.
10:33:16.632 DEBUG Launching command /builds/cybellum/psa/.sonar/js/node-runtime/node /builds/cybellum/psa/.scannerwork/.sonartmp/bridge-bundle/package/bin/server.cjs 45655 127.0.0.1 false 15000
10:33:18.166 DEBUG The worker thread is running
10:33:18.167 INFO  Memory configuration: OS (31712 MB), Node.js (2096 MB).
10:33:18.167 DEBUG Starting the bridge server
10:33:18.176 DEBUG The bridge server is listening on port 45655
10:33:18.208 DEBUG Bridge server started on port 45655 in 1586 ms
10:33:18.218 DEBUG WebSocket connection opened: ws://127.0.0.1:45655/ws
10:33:18.218 INFO  WebSocket client connected on /ws
10:33:18.220 INFO  Plugin version: [11.0.0.33655]

Looks like it’s using embedded version.

Thank you @Roman_Mykhailiuk!

Hi @Francis, it seems you have the same problem. The solution is updating Node as you have noticed.

This problem comes from the usage of dirent.parentPath in the latest release. This attribute was added in the versions v21.4.0, v20.12.0, v18.20.0.

Please open a new thread for the problem you are mentioning about tsconfig files. Please add debug logs and what sonar properties you are setting. Are you setting the sonar property sonar.typescript.tsconfigPath?