React app freezes when building in Lightsail

18 views Asked by At

I'm trying to build my react app with this script react-scripts --max_old_space_size=4096 build however it freezes on Creating an optimized production build...

I've tried removing the --max_old_space_size flag however I get this error:

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

Could someone point me into the right direction to solve this issue.

Thanks

0

There are 0 answers