How to resolve the Javascript memory heap out issue that occurs while building the React application
To resolve the JavaScript memory heap out issue when you build a React application with Bold Reports®, add --max_old_space_size=4096 to the scripts in the package.json file. The memory heap out issue occurs when the heap size is not sufficient to run the application.
Open the package.json file in the root folder of the React application and use --max_old_space_size=4096 as in the following code snippet:
...
...
"scripts": {
"start": "react-scripts --max_old_space_size=4096 start",
"build": "react-scripts --max_old_space_size=4096 build",
"test": "react-scripts test",
"eject": "react-scripts eject"
}
...