I encountered an error and I'm seeking a brief explanation to help me understand what needs to be fixed.
This error occurs during the compilation of TypeScript.
<--- Last few GCs --->
[1791:0x5533880] 72626 ms: Scavenge (reduce) 2042.8 (2082.2) -> 2042.1 (2082.5) MB, 10.0 / 0.0 ms (average mu = 0.287, current mu = 0.243) allocation failure
[1791:0x5533880] 74247 ms: Mark-sweep (reduce) 2043.0 (2082.5) -> 2037.5 (2082.5) MB, 1617.4 / 0.0 ms (average mu = 0.225, current mu = 0.159) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xb09c10 node::Abort() [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
2: 0xa1c193 node::FatalError(char const*, char const*) [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
3: 0xcf8dbe v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
4: 0xcf9137 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
5: 0xeb09d5 [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
6: 0xeb14b6 [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
7: 0xebf9de [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
8: 0xec0420 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
9: 0xec339e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
10: 0xe848da v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
11: 0x11fd626 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
12: 0x15f2099 [/opt/hostedtoolcache/node/16.15.0/x64/bin/node]
Node.js : 16.15.0 TypeScript : 4.2.4