Javascript out of heap memory issue


We are currently examining our Node.js project using the sonar-scanner- tool. Unfortunately, we keep encountering an out-of-heap memory error, as depicted in the attached screenshot.

To address this issue, we have attempted the solution provided in the following link:

We have made various attempts to configure the Sonar scanner using the following solutions:

  1. Executing the command: npm run sonar -Dsonar.javascript.node.maxspace=4096
  2. Including the following line in the file: sonar.javascript.node.maxspace=8192

Despite our efforts, the problem persists, and the analysis continues to use the default heap memory of 2048, resulting in failed analyses.

We kindly request your assistance in resolving this issue.

What version of SonarQube are you using? You can find this information in the footer of your SonarQube instance.

  • Community Edition
  • Version 7.9.6 (build 41879)


Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.6 → 8.9.10 → 9.9 → 10.0 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

1 Like

Is the sonar-javascript-plugin supported in the latest version of Sonarqube?

Yes, SonarQube v9.9 LTS supports analyzing Javascript, but it is no longer provided as a plugin (it’s baked into the core of SonarQube)