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.

JavaScript heap out of memory error during expo publish

See original GitHub issue

Basically, a duplicate of this issue: https://github.com/expo/expo-cli/issues/94.

The suggested fix through env variable applies and solves the issue, e.g.:

action "Publish" {
  uses = "expo/expo-github-action@2.3.0"
  env = {
    NODE_OPTIONS = "--max_old_space_size=4096"
  }
  args = "publish"
  secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
}

According to the documentation the environments have up to 3.75 GB of ram: https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#runtime-environment-resources

Not sure how you would prefer to handle this, either through documentation or hardcoded within the Dockerfile?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
mouhamedalycommented, Oct 6, 2020

If anyone else comes here after encountering this issue using the latest version (@v5), the fix above is no longer relevant. Now, you can simply apply the NODE_OPTIONS directly to the step like so:

- run: expo publish
  env:
    NODE_OPTIONS: --max_old_space_size=4096

I try this, but i have the same issue: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

2reactions
bradbytecommented, May 29, 2020

If anyone else comes here after encountering this issue using the latest version (@v5), the fix above is no longer relevant. Now, you can simply apply the NODE_OPTIONS directly to the step like so:

- run: expo publish
  env:
    NODE_OPTIONS: --max_old_space_size=4096
Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript heap out of memory error during expo publish #94
Observed Behavior. Node.js ran out of memory. It seems like node's default limit is somewhere around 1.5GB. $ expo publish [14 ...
Read more >
Error when trying to start expo - JavaScript heap out of memory
I'm trying to start my expo project with "expo start" but I'm getting the error: FATAL ERROR: Ineffective mark-compacts near heap limit ......
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. Here's an example...
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 resolve the memory heap out issue in React App
The memory heap out issue occurs when the heap size is not sufficient to run the application. To resolve this issue, open the...
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