How to Solve Nuxt startup error: <--- Last few GCs --->

Error content

    <--- Last few GCs --->

    [19572:000001F6D0A888C0]  2084451 ms: Mark-sweep 2001.3 (2054.1) -> 1995.6 (2053.7) MB, 61.1 / 0.0 ms  (average mu = 0.173, current mu = 0.145) allocation failure scavenge might not succeed
    [19572:000001F6D0A888C0]  2084524 ms: Mark-sweep 1997.2 (2053.9) -> 1995.4 (2053.9) MB, 64.6 / 0.0 ms  (average mu = 0.146, current mu = 0.116) allocation failure scavenge might not succeed


    <--- JS stacktrace --->

    ==== JS stack trace =========================================

cause

node v8 storage overflow

Solution

Original package.json configuration

"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"

Modify startup items

"dev": "node --max-old-space-size=4096 node_modules/nuxt/bin/nuxt.js dev",
"build": "node --max-old-space-size=4096 node_modules/nuxt/bin/nuxt.js build",
"start": "node --max-old-space-size=4096 node_modules/nuxt/bin/nuxt.js start",
"generate": "node --max-old-space-size=4096 node_modules/nuxt/bin/nuxt.js generate"

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *