How to allocate more memory to my Virtual Machine running on Fedora to avoid Heap out of Memory Error : <p>I'm running Jenkins on a Fedora Virtual Machine and have an app created by <a href="https://github.com/facebook/create-react-app" rel="noreferrer">create-react-app</a> . </p>

<p>When I try to build for production on my local machine, after ~8 minutes, it does get compiled successfully (although with the message: 'the bundle size is significantly larger than recommended...' </p>

<p>However, when I run the same script during my Jenkins build process, I get the following error: <code>FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory</code>.</p>

<p>The build script is as follows: <code>npm run build-css &amp;&amp; node --max_old_space_size=8192 node_modules/.bin/react-scripts-ts build &amp;&amp; npm run copy-to-build</code>.</p>

<p>My question is, how can I allocate more memory for my Virtual Machine running on Fedora so the script can run successfully before throwing the <code>FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory</code> .</p>
