How to resolve memory heap fatal error in angular

Discussão em 'Angular' iniciado por Nimra Jabbar, Junho 24, 2025.

  1. Nimra Jabbar

    Nimra Jabbar Guest

    Currently, I have a fatal error displaying when I start my project. I have tried all possible solutions, so please let me know how can I resolve this.

    ng serve
    ⠴ Generating browser application bundles (phase: building)...
    <--- Last few GCs --->

    [27248:03EFBAA8] 311252 ms: Mark-sweep (reduce) 1014.2 (1026.2) -> 1013.6 (1027.5) MB, 2168.8 / 0.1 ms (average mu = 0.074, current mu = 0.009) alloc


    <--- JS stacktrace --->

    FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory

    C:\Users\Nimra\Desktop\angular\QA\enableu-app>ng serve
    ⠴ Generating browser application bundles (phase: building)...
    <--- Last few GCs --->

    [22980:03E894E0] 171563 ms: Mark-sweep 1016.1 (1032.6) -> 1014.0 (1034.1) MB, 1007.2 / 0.1 ms (average mu = 0.127, current mu = 0.023) allocation failure scavenge might not succeed
    [22980:03E894E0] 173624 ms: Mark-sweep 1018.1 (1042.1) -> 1016.0 (1043.3) MB, 2038.4 / 0.1 ms (average mu = 0.051, current mu = 0.011) allocation fai

    <--- Last few GCs --->

    [12044:03E79450] 111 ms: Mark-sweep 1.0 (3.3) -> 1.0 (3.3) MB, 3.2 / 0.0 ms (average mu = 0.772, current mu = 0.044) allocation failure GC in old space requested
    [12044:03E79450] 115 ms: Mark-sweep (reduce) 1.0 (3.3) -> 0.9 (3.3) MB, 3.4 / 0.0 ms (average mu = 0.647, current mu = 0.185) last resort GC in old space requested
    [12044:03E79450] 119 ms: Mark-sweep (reduce) 0.9 (2.3) -> 0.9 (3.3) MB, 4.0 / 0.0 ms (average mu = 0.463, current mu = 0.014) last resort GC in old space requested


    <--- JS stacktrace --->

    FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory


    Tried these solutions without success:

    1. Uninstall node, cli everything, download it again, and start
    2. Update npm and everything not working
    3. Reclone my project from main project.
    4. Tried by increasing memory size by commands

    [​IMG] [​IMG]

    Continue reading...

Compartilhe esta Página