question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Amplify CLI v4.16.0 && 4.16.1

Was having this issue before, with 4.13. The 4.16.0 update seemed to fix it but now it sprung back up. Getting this same error when running amplify publish locally, and during the auto-builds in Amplify Console.

Issue Analytics

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

github_iconTop GitHub Comments

23reactions
charleslouiscommented, Jul 16, 2020

If anyone comes here looking to build a JS frontend on Amplify, it seems that it comes from the difference in the way memory is handled by node v10 vs node v12.

Check how you can add nvm use $VERSION_NODE_12 to your build settings as explained by @atlesp here https://github.com/aws-amplify/amplify-console/issues/440#issuecomment-602626451 image

13reactions
blazinajcommented, Mar 20, 2020

I think this is an issue now with react-scripts, it is tied with the frontend build command. I’m sorry for asking about it here. I set the --max_old_space_size flag in my build script and seemed to fix it. Thanks for the quick response.

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts --max_old_space_size=8192 build",
    "test": "react-scripts test",
    "test:cov": "react-scripts test --coverage",
    "test:debug": "react-scripts --inspect-brk test --runInBand",
    "eject": "react-scripts eject"
  },
Read more comments on GitHub >

github_iconTop Results From Across the Web

FATAL ERROR: Ineffective mark-compacts near heap limit ...
The error occurs when you exceed the default maximum memory allowed for Node.js. All this does is increase the maximum memory allowed. Share....
Read more >
JavaScript heap out of memory - Snyk Support
You may encounter an error such as the following while running one of the Snyk CLI commands: FATAL ERROR: Ineffective mark-compacts near heap...
Read more >
FATAL ERROR: Ineffective mark-compacts near heap ... - GitHub
I am having an existing angular application with angular version 11.0.2. Following the migration guide in the documentation, ...
Read more >
Fixing FATAL ERROR: Ineffective mark-compacts near heap ...
Fixing FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in Webpacker.
Read more >
FATAL ERROR: Ineffective mark-compacts near heap limit ...
Javascript – FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory in Ionic 3.
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