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

**URL:** <https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223>\
**Category:** IntelliJ Platform\
**Tags:** bug, intellij, sonarqube-ide\
**Created:** [September 8, 2025, 5:39am UTC](https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223 "2025-09-08T05:39:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![piotr1](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/piotr1/32/67764_2.png) [@piotr1](https://community.sonarsource.com/u/piotr1)\
**Post date:** [September 8, 2025, 5:39am UTC](https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223/1 "2025-09-08T05:39:13Z")

</div>

**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:

```auto
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:

```auto
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:

```auto
\`\`\`
\[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\`\`\`

```

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [September 8, 2025, 8:36am UTC](https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223/2 "2025-09-08T08:36:34Z")

</div>

Hey there.

What version of Node are you using? There are some [super specific minor version requirements](https://docs.sonarsource.com/sonarqube-for-ide/vs-code/getting-started/requirements/#jstscss-analysis) 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)

---

<div class="post-metadata">

**Author:** ![piotr1](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/piotr1/32/67764_2.png) [@piotr1](https://community.sonarsource.com/u/piotr1)\
**Post date:** [September 8, 2025, 12:44pm UTC](https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223/4 "2025-09-08T12:44:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nicolas.quinquenel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nicolas.quinquenel/32/40740_2.png) [@nicolas.quinquenel](https://community.sonarsource.com/u/nicolas.quinquenel)\
**Post date:** [September 8, 2025, 1:18pm UTC](https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223/6 "2025-09-08T13:18:46Z")

</div>

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:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/a/7/a79e6c31ab0f822c88a0c724606ac1d5f47335bf.png)

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

It would also be helpful if you could share the full [verbose logs](https://docs.sonarsource.com/sonarqube-for-ide/intellij/troubleshooting/#how-to-get-sonarqube-for-ide-logs) from SonarQube for IDE, starting from when the IDE is first opened.

Thank you!

---

<div class="post-metadata">

**Author:** ![piotr1](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/piotr1/32/67764_2.png) [@piotr1](https://community.sonarsource.com/u/piotr1)\
**Post date:** [September 9, 2025, 5:22am UTC](https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223/7 "2025-09-09T05:22:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nicolas.quinquenel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nicolas.quinquenel/32/40740_2.png) [@nicolas.quinquenel](https://community.sonarsource.com/u/nicolas.quinquenel)\
**Post date:** [September 9, 2025, 7:10am UTC](https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223/8 "2025-09-09T07:10:13Z")

</div>

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](https://plugins.jetbrains.com/plugin/7973-sonarqube-for-ide), it’s always appreciated!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [September 16, 2025, 7:11am UTC](https://community.sonarsource.com/t/sonarlint-javascript-typescript-analysis-fails-with-cannot-read-properties-of-undefined-reading-r/148223/10 "2025-09-16T07:11:08Z")

</div>

Closed on September 16, 2025, 7:11am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
