I\'m trying to deploy a reactjs application to heroku. While compiling assets, the build fails and produces this error:
-----> Ruby app detected
----->
The root cause of the issue is due to large source file sizes.
If the underline problem is within your source code you can resolve it by simply increasing the Node Heap Size as below,
"start": "react-scripts --max_old_space_size=4096 start",
"build": "react-scripts --max_old_space_size=4096 build",
But if the problem lies within any dependencies introduced, we may need to increase the Node Heap allocation globally to resolve the issue.
For Windows:
set NODE_OPTIONS=--max_old_space_size=4096
For Linux:
export NODE_OPTIONS=--max_old_space_size=4096