title: Worker terminated due to reaching memory limit: JS heap out of memory
body: <p>After upgrading my angular 10 to angular 13, I got this error after using the command <code>ng serve</code>.</p>
  <pre><code>⠧ Generating browser application bundles (phase: building)...events.js:377
        throw er; // Unhandled 'error' event
        ^
  
  Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
      at new NodeError (internal/errors.js:322:7)
      at Worker.[kOnExit] (internal/worker.js:276:26)
      at Worker.&lt;computed&gt;.onexit (internal/worker.js:203:20)
  Emitted 'error' event on Worker instance at:
      at Worker.[kOnExit] (internal/worker.js:276:12)
      at Worker.&lt;computed&gt;.onexit (internal/worker.js:203:20) {
    code: 'ERR_WORKER_OUT_OF_MEMORY'
  }
  </code></pre>
  <p>Already tried to increase the memory limit of Node and installing the latest version of Node.</p>
  <p>My node version is v14.18.1 and my npm version is 6.14.15.
  This problem didn't happen with angular 12 or 11.</p>