Out of memory error when building the client manually

I am trying to build the web client manually using the command:

npm run build

However after few minutes I get this error:

JavaScript heap out of memory

Obviously its going out of memory but why is this happening? I am on Mac with 8GB Ram.

This as you already suggested happens due to the memory issue. You need to specify to your node process the exact memory allocation by adding --max_old_space_size flag.

Add this command in your build

node --max_old_space_size=4096

Hi there.

Seems like you’ve got Javascript Heap Out of Memory issue while on building the web client image.

Please make sure that you got enough system resources before building the image. We recommend user to have at least 8GB of free memory to run the HollaEx Kit seamlessly.

Also, If you are using Docker for Mac, By default It doesn’t use 100% of your system resource. You should increase the allocated CPU and memory on It’s preference. You’ll be able to see it on Preference of Docker for Mac - Advanced.

Please reply to me If your problem didn’t get solved.