1

I'm trying to run a react-native project on an older MacBook Pro from 2011 with 4 gb of ram because my new MacBook Pro is in for repair.

The error I'm getting when building is "JavaScript heap out of memory":

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/Max/.nvm/versions/node/v6.7.0/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, 
v8::Local<v8::Message>) [/Users/Max/.nvm/versions/node/v6.7.0/bin/node]

I tried the fix refered here: How to prevent node from running out of memory when bundling js for React Native

But the problem still persist. Any idea what might be wrong and how to fix this? Is this an unsolvable issue with my machine and maybe I have to wait for my regular workstation with 16 gb of ram to be repaired or is there another solution?

Anjuna5
  • 39
  • 1
  • 4
  • Maybe your code is just using a huge amount of memory without any good reason. What does the code do that should require so much memory? – Pointy Jun 13 '17 at 17:18
  • One possible issue is that react native packager is eating up all your available memory + swap (you for sure do not have a full 4gb system memory to play with). It might be possible for you to increase the amount of swap space available on your machine since most of your 4gb is probably already used by the OS and other applications. – manbearshark Jun 13 '17 at 22:19
  • @Anjuna5 I am also facing same issue after adding big file in the bundle. Do you know how to resolve this. I am testing on iOS. – Sujit Jul 10 '18 at 09:29

0 Answers0