JS heap out of memory

See original GitHub issue

I’m facing this error when trying to run craco build. The craco start script works fine (just takes a long time to run) I’ve tried to set --max-old-space-size=8192 after searching similar issues, but nothing changed. My node version is 15.11.0.

issue_craco

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Cabanaskcommented, Oct 20, 2021

I have the same problem on craco build and craco start ,

  • node 14.15.0
  • “react”: “^17.0.2”,
  • @craco/craco”: “6.1.2”,
  • “react-scripts”: “4.0.3”,
  • “craco-alias”: “3.0.0”,
  • “craco-babel-loader”: “0.1.4”,
  • “typescript”: “^4.4.4”

errors: `Files successfully emitted, waiting for typecheck results…

<— Last few GCs —>

[88596:0x1046c6000] 110361 ms: Scavenge 2040.9 (2053.9) -> 2037.2 (2054.2) MB, 3.3 / 0.0 ms (average mu = 0.209, current mu = 0.072) allocation failure [88596:0x1046c6000] 110367 ms: Scavenge 2041.1 (2054.2) -> 2037.2 (2054.7) MB, 2.4 / 0.0 ms (average mu = 0.209, current mu = 0.072) allocation failure [88596:0x1046c6000] 111468 ms: Mark-sweep 2041.2 (2054.7) -> 2037.1 (2054.4) MB, 1097.0 / 0.0 ms (average mu = 0.145, current mu = 0.067) allocation failure scavenge might not succeed

<— JS stacktrace —>

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory`

2reactions
patricklafrancecommented, Oct 20, 2021

Does anyone have any proof it’s related to CRACO and not CRA?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix JavaScript Heap Out of Memory Error - MakeUseOf
A common problem while working on a JavaScript Node.js project is the “JavaScript heap out of memory” error. This error usually occurs when ......
Read more >
Node.js heap out of memory - javascript - Stack Overflow
I have a 64-bit CPU and I've installed x86 node version, which caused the CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory ......
Read more >
JavaScript heap out of memory - Snyk Support
This generally occurs on larger projects where the default amount of memory allocated by Node (1.5gb) is insufficient to complete the command successfully....
Read more >
How to solve JavaScript heap out of memory error
To fix JavaScript heap out of memory error, you need to add the --max-old-space-size option when running your npm command. ... Alternatively, you ......
Read more >
JavaScript Heap Out Of Memory Error - OpenReplay Blog
A quick solution that you can use to fix "Heap Out Of Memory Error" in JavaScript. We lay out the causes and how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found