After upgrading my angular 10 to angular 13, I got this error after using the command ng serve
.
⠧ 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.<computed>.onexit (internal/worker.js:203:20)
Emitted 'error' event on Worker instance at:
at Worker.[kOnExit] (internal/worker.js:276:12)
at Worker.<computed>.onexit (internal/worker.js:203:20) {
code: 'ERR_WORKER_OUT_OF_MEMORY'
}
Already tried to increase the memory limit of Node and installing the latest version of Node.
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.