FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Please provide

  • Operating system: Windows 11
  • IDE name and flavor/env: Vs Code
  • SonarLint plugin version: 3.3.3
  • Is connected mode used: No
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:

Hi,
SonarLint gives

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

error while analyzing my angular project. I uploaded logs. Could you please help?
SonarLint Log.txt (23.3 KB)

What is wrong with this question. Why is no one answering?

Hi @zormax - welcome to the community.

As a new member, you might want to have a look at the community FAQs, particularly the section I created a topic, when can I expect a response?

Have you tried increasing the size of memory, as suggested in the error log?

[Error - 15:44:43.552] eslint-bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096).

Hi Duncan, thanks for your reply.

I already have environment variables NODE_OPTIONS --max-old-space-size=12288. I am using only SonarLint extension for VS Code. I searched but couldn’t find where

sonar.javascript.node.maxspace

setting is. Could you please help, where can add this setting?

SystemPropertiesAdvanced_unGEmmCOLX

I also added sonar.javascript.node.maxspace to my VS Code setting.json file but it looks faded and seems it has no effect.

Code_guKJlldTY6

Hi @zormax

This should be passed using the analyzer properties setting:
image

1 Like

@Julien_HENRY, you’re great, it’s working now.

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