FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Has anyone converted a React TSX project to JSX? I am trying to do so and am wondering how.
The reason why I am doing this is because encountered an error while building,
I am using the AWS free tier and increasing heap size not and options for me
I tried to convert each file separately with the tsc compiler, but it is giving me compiled JSX even after setting:
I presume this is happening because of an extra layer due to tsc converting to JSX.
Sorry, this might be a completely gauche assumption. Can anyone point me in the right direction?
1 Reply
If you got this message, going from TSX to JSX wont help, on the contrary it might get you more problems. Also, I don't know what made you try this but please don't ever do that again 🤣
Firstly, try to delete node_modules, reinstall all deps, and try to build locally.
Also, I need more info... like is this specific to AWS? Can you build locally? What are you using to deploy to AWS?...