SonarLint JavaScript/TypeScript analysis fails with "Cannot read properties of undefined (reading 'r

Operating system: macOS

SonarQube for IntelliJ plugin version: 11.0.1.82376

IntelliJ version: PhpStorm 2025.2

Programming language you’re coding in: JavaScript/TypeScript

Is connected mode used: YES

SonarQube Cloud, SonarQube Server, or SonarQube Community Build? SonarQube Server

Thorough description of the problem:

SonarLint analysis fails when analyzing JavaScript/TypeScript files with the following error:

Analysis of JS/TS files failed
java.lang.IllegalStateException: Analysis of JS/TS files failed

The root cause appears to be a JavaScript error in the ESLint bridge server:

TypeError: Cannot read properties of undefined (reading 'replace')

Steps to reproduce:

  1. Open a project containing JavaScript/TypeScript files in PhpStorm 2025.2

  2. Trigger SonarLint all files analysis

  3. The analysis fails with the above error

Expected behavior: SonarLint should successfully analyze JavaScript/TypeScript files without errors.

Actual behavior: Analysis fails with a TypeError indicating that an undefined variable is being accessed for a ‘replace’ operation in the ESLint bridge server component.

Additional context:

  • The error occurs in the ESLint bridge server (server.cjs)

  • The issue appears to be related to the JavaScript/TypeScript sensor execution

  • Full stack trace available if needed for debugging

This appears to be a regression or compatibility issue with the ESLint bridge component in the latest plugin version.

FULL LOG:

\`\`\`
\[2025-09-08T07:28:48.195\] \[sonarlint-analysis-scheduler\] ERROR sonarlint - Error executing sensor: ‘JavaScript/TypeScript analysis’
java.lang.IllegalStateException: Analysis of JS/TS files failed
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:100)
at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.lambda$executeSensor$1(SensorsExecutor.java:102)
at org.sonarsource.sonarlint.core.commons.monitoring.Trace.startChild(Trace.java:63)
at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:102)
at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:93)
at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:80)
at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
at org.sonarsource.sonarlint.core.commons.monitoring.Step.executeTransaction(Step.java:42)
at org.sonarsource.sonarlint.core.commons.monitoring.Trace.lambda$startChildren$0(Trace.java:76)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at org.sonarsource.sonarlint.core.commons.monitoring.Trace.startChildren(Trace.java:76)
at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:184)
at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:165)
at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:78)
at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.doRunAnalysis(AnalyzeCommand.java:203)
at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.doExecute(AnalyzeCommand.java:149)
at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:140)
at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.lambda$execute$0(AnalyzeCommand.java:132)
at org.sonarsource.sonarlint.core.commons.progress.TaskManager.runExistingTask(TaskManager.java:47)
at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:131)
at org.sonarsource.sonarlint.core.analysis.AnalysisScheduler.executeQueuedCommands(AnalysisScheduler.java:75)
at java.base/java.lang.Thread.run(Thread.java:1583)
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 Nz (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2180:3901)\\n    at xHs (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:233299)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\\n    at async dFd (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:233557)\\n    at async bHs (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:233747)\\n    at async DHs (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:236472)\\n    at async gRe (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:239133)\\n    at async MessagePort. (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:243016)”}
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:431)
at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:119)
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:75)
… 22 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 Nz (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2180:3901)\\n    at xHs (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:233299)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\\n    at async dFd (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:233557)\\n    at async bHs (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:233747)\\n    at async DHs (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:236472)\\n    at async gRe (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:239133)\\n    at async MessagePort. (/Users/macos/Library/Application Support/JetBrains/PhpStorm2025.2/plugins/sonarlint-intellij/plugins/eslint-bridge/package/bin/server.cjs:2204:243016)”}
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)
… 1 more\`\`\`

Hey there.

What version of Node are you using? There are some super specific minor version requirements that when not followed, can cause the error you’re getting.

(that said, not sure why we don’t issue a clearer error message, and I’ll flag that for the team)

I am using node version v20.19.0, but I don’t know if this particular version is used by IntelliJ

Hey @piotr1, thanks for reaching out.

We currently support the following Node.js versions: ≥ 18.20.0, ≥ 20.12.0, or ≥ 21.4.0. This means version 20.19.0 should be valid.

However, you are correct that SonarQube for IDE might not actually use the version you’ve mentioned. To confirm, please go to:
Settings → Tools → SonarQube for IDE
Next to the Node.js path field, you’ll see the version being used, similar to this example:

If the version is incorrect, try setting the path manually.

It would also be helpful if you could share the full verbose logs from SonarQube for IDE, starting from when the IDE is first opened.

Thank you!

Thank you for your help - I had a different version set here (20.11) :slight_smile:

Super, thank you for the quick confirmation! We are aware that this issue is not ideal, and we will try to improve the UX to give more feedback.

Otherwise, if you enjoy using SonarQube for IDE, feel free to leave a review on our marketplace page, it’s always appreciated!

1 Like