Nuxt 3 app suddenly started to fail on build

Hi there,

Experiencing build fails with the Nuxt 3 app. It started for seemingly no reason, previous builds were running with no issues. I changed only html file on the home page. I tried options that I found in this support section, with similar Nuxt 3 build errors, such as NODE_OPTIONS in the environment variables or options in Nuxt.config - didn’t help much. I don’t understand which module causes the error.

the site is at https://gphil-nuxt.netlify.app/, the last succesfully published version

Full build log:
9:37:11 PM: Netlify Build
9:37:11 PM: ────────────────────────────────────────────────────────────────
9:37:11 PM: ​
9:37:11 PM: ❯ Version
9:37:11 PM: netlify/build 29.51.3
9:37:11 PM: ​
9:37:11 PM: ❯ Flags
9:37:11 PM: baseRelDir: true
9:37:11 PM: buildId: 66ad8997bcb31a0008e7a812
9:37:11 PM: deployId: 66ad8997bcb31a0008e7a814
9:37:11 PM: ​
9:37:11 PM: Warning: the same header is set twice with different cases: “cache-control” and “Cache-Control”
9:37:11 PM: ​
9:37:11 PM: ❯ Current directory
9:37:11 PM: /opt/build/repo
9:37:11 PM: ​
9:37:11 PM: ❯ Config file
9:37:11 PM: /opt/build/repo/netlify.toml
9:37:11 PM: ​
9:37:11 PM: ❯ Context
9:37:11 PM: production
9:37:11 PM: ​
9:37:11 PM: Build command from Netlify app
9:37:11 PM: ────────────────────────────────────────────────────────────────
9:37:11 PM: ​
9:37:11 PM: $ nuxt build
9:37:11 PM: [log] Nuxt 3.12.4 with Nitro 2.9.7
9:37:12 PM: [log] Using 2024-04-03 as fallback compatibility date.
9:37:12 PM: [info] Nuxt Icon server bundle mode is set to local
9:37:12 PM: [success] Nuxt Icon discovered local-installed 176 collections (iconify/json)
9:37:12 PM: [info] [nuxt:tailwindcss] Using Tailwind CSS from ~/assets/css/tailwind.css
9:37:13 PM: [info] [nuxtjs/sanity] Running with Sanity project b8uar5wl (production).
9:37:13 PM: [warn] Overriding Icon component. You can specify a priority option when calling addComponent to avoid this warning.
9:37:15 PM: [info] Building client…
9:37:15 PM: [info] vite v5.3.5 building for production…
9:37:15 PM: [info] transforming…
9:37:22 PM: [info] ✓ 1208 modules transformed.
9:37:23 PM: [info] rendering chunks…
9:37:23 PM: [info] computing gzip size…
9:37:23 PM: [info] .nuxt/dist/client/manifest.json 12.56 kB │ gzip: 1.64 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/roboto-v27-latin-100.0yE9BJhv.woff2 15.71 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/roboto-v27-latin-500.C1mc9L83.woff2 15.92 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/roboto-v27-latin-100.Ck0d6_Bu.woff 20.42 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/roboto-v27-latin-500.9thiwgmH.woff 20.53 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/performance.DljKuEjy.css 0.04 kB │ gzip: 0.06 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/entry.vr06_eLv.css 0.17 kB │ gzip: 0.14 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/IconCSS.hnX6WxNg.css 0.26 kB │ gzip: 0.17 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/slug.BSyqTQ7C.css 0.38 kB │ gzip: 0.23 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/ProgressBar.-qtqwsrx.css 0.77 kB │ gzip: 0.25 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/error-500.CCSiCbc9.css 1.88 kB │ gzip: 0.72 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/error-404.BWCxH4-1.css 3.53 kB │ gzip: 1.09 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/BIHI7g3E.js 0.03 kB │ gzip: 0.05 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/WuNrTfTC.js 0.12 kB │ gzip: 0.11 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/iPYpAgB6.js 0.17 kB │ gzip: 0.13 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/Dgg5mmEI.js 0.24 kB │ gzip: 0.20 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/DNuz1Kuj.js 0.25 kB │ gzip: 0.22 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/6VpA2ObR.js 0.29 kB │ gzip: 0.24 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/DkoJG1o7.js 0.44 kB │ gzip: 0.29 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/C_K6UG5W.js 0.48 kB │ gzip: 0.32 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/Dvn3x_fB.js 0.88 kB │ gzip: 0.56 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/BXMvWw8w.js 1.02 kB │ gzip: 0.67 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/C9wF2mys.js 1.05 kB │ gzip: 0.56 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/BLTFphv3.js 1.05 kB │ gzip: 0.57 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/B_RiHXSX.js 1.24 kB │ gzip: 0.69 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/CmGwS7k1.js 2.15 kB │ gzip: 1.04 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/CeKjqUYW.js 2.74 kB │ gzip: 1.23 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/BEEbjEpv.js 3.08 kB │ gzip: 1.39 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/CjS7uk38.js 3.81 kB │ gzip: 1.87 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/D6G5ZAgW.js 5.15 kB │ gzip: 2.05 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/D5gOYdM7.js 5.72 kB │ gzip: 2.35 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/Bk4_Iz15.js 6.07 kB │ gzip: 2.81 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/-EVKqUhF.js 6.12 kB │ gzip: 2.29 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/C_fWU8F3.js 6.93 kB │ gzip: 2.88 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/BGGkrJsA.js 7.87 kB │ gzip: 3.07 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/CZu3vHOA.js 8.04 kB │ gzip: 3.00 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/B8LTZFYW.js 11.00 kB │ gzip: 4.60 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/B2WmkuHa.js 12.25 kB │ gzip: 4.82 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/EHpvEnUr.js 12.69 kB │ gzip: 4.91 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/Dph6ROtB.js 16.90 kB │ gzip: 5.46 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/B8NbfEkO.js 27.58 kB │ gzip: 9.11 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/DAzJI1uG.js 77.32 kB │ gzip: 22.04 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/BQUEFB0j.js 81.68 kB │ gzip: 27.70 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/DVw8BiaE.js 402.10 kB │ gzip: 135.25 kB
9:37:23 PM: [info] .nuxt/dist/client/_nuxt/DMgFA9vS.js 2,197.49 kB │ gzip: 715.19 kB
9:37:23 PM: [warn]
9:37:23 PM: (!) Some chunks are larger than 500 kB after minification. Consider:
9:37:23 PM: - Using dynamic import() to code-split the application
9:37:23 PM: - Use build.rollupOptions.output.manualChunks to improve chunking: Configuration Options | Rollup
9:37:23 PM: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
9:37:23 PM: [info] ✓ built in 8.56s
9:37:23 PM: [success] Client built in 8575ms
9:37:23 PM: [info] Building server…
9:37:23 PM: [info] vite v5.3.5 building SSR bundle for production…
9:37:23 PM: [info] transforming…
9:37:29 PM: [info] ✓ 478 modules transformed.
9:37:29 PM: [info] rendering chunks…
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/app-styles.D2fmKapJ.mjs 0.08 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/Icon-styles.CpBumNe6.mjs 0.08 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/IconCSS-styles.Cw2yMytu.mjs 0.08 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/error-404-styles.B0cIlID8.mjs 0.08 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/error-500-styles.CkT313uf.mjs 0.08 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/AboutScore-styles.15eHgse3.mjs 0.09 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/HelpBubble-styles.D5d-aILb.mjs 0.09 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/SectionImage-styles.Cu9vwdnf.mjs 0.09 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/MetronomeBody-styles.DCAV7oVV.mjs 0.09 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/app-styles.RRhLnoVT.mjs 0.15 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/Icon-styles.D8HBYpyw.mjs 0.15 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/IconCSS-styles.CUtbMFvs.mjs 0.15 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/error-404-styles.B-e86P7u.mjs 0.15 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/error-500-styles.DCjYnvwu.mjs 0.15 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/AboutScore-styles.DFnjcdnP.mjs 0.16 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/HelpBubble-styles.Bz8gdalf.mjs 0.16 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/SectionImage-styles.C7FAQXpe.mjs 0.16 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/MetronomeBody-styles.DVBHLPyQ.mjs 0.16 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/entry-styles.D12Xf-jo.mjs 0.28 kB
9:37:30 PM: [info] .nuxt/dist/server/styles.mjs 3.26 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/SectionImage-styles-1.mjs-JkLcLtGq.js 0.22 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/HelpBubble-styles-1.mjs-BvEwZ2xu.js 0.22 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/entry-styles-4.mjs-DKCm_IFN.js 0.26 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/entry-styles-3.mjs-qunPkrkP.js 0.26 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/entry-styles-2.mjs-B7EBKe-T.js 0.33 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/useMobile-CEU2hxTA.js 0.38 kB │ map: 0.94 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/IconCSS-styles-1.mjs-D_oD_sDC.js 0.46 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/AboutScore-styles-1.mjs-5yFsANGq.js 0.56 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/MetronomeBody-styles-1.mjs-BHjHnoZA.js 1.00 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/home-D5O-F_7-.js 1.28 kB │ map: 0.61 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/auth-BjwuCN1t.js 1.39 kB │ map: 1.40 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/piano-D2pEuwmt.js 1.62 kB │ map: 1.36 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/library-C5ucyfhD.js 1.67 kB │ map: 0.69 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/SectionTips-BYRsPshD.js 2.00 kB │ map: 2.64 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/error-500-styles-1.mjs-CbodYG_y.js 2.10 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/Button-Dl5Zec3d.js 2.28 kB │ map: 1.71 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/score-7JqxXjZJ.js 2.49 kB │ map: 1.38 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/IconCSS-ciSZzwSp.js 2.87 kB │ map: 3.63 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/error-404-styles-1.mjs-C-ys3bRz.js 3.80 kB │ map: 0.12 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/keyboard-ZFJK_Wbn.js 3.95 kB │ map: 12.76 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/error-500-CJ_xlcKs.js 4.00 kB │ map: 4.79 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/SubscriptionTable-DNDBHCW1.js 4.25 kB │ map: 2.92 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/error-404-_7u6narE.js 4.78 kB │ map: 6.62 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/sessions-BCoDh6HV.js 5.30 kB │ map: 2.52 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/library-XxfDskfO.js 12.02 kB │ map: 14.15 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/default-DNjSqn0Y.js 13.40 kB │ map: 9.98 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/useLibrary-O4KoQZaV.js 16.22 kB │ map: 42.81 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/ProgressBar-C334ecdK.js 17.25 kB │ map: 31.58 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/index-DJANnHFu.js 17.51 kB │ map: 6.84 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/profile-BX8pYXox.js 20.52 kB │ map: 13.04 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/index-CQGuIBJx.js 56.40 kB │ map: 33.22 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/slug-D4PZEo9X.js 61.87 kB │ map: 66.02 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/useUser-IJvjau7h.js 134.70 kB │ map: 322.86 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/performance-DkWN4Kqs.js 184.32 kB │ map: 285.02 kB
9:37:30 PM: [info] .nuxt/dist/server/server.mjs 195.79 kB │ map: 749.94 kB
9:37:30 PM: [info] .nuxt/dist/server/_nuxt/entry-styles-1.mjs-nynIVc1R.js 314.19 kB │ map: 0.11 kB
9:37:30 PM: [info] ✓ built in 6.60s
9:37:30 PM: [success] Server built in 6610ms
9:37:30 PM: [success] [nitro] Generated public dist
9:37:31 PM: PWA v0.20.1
9:37:31 PM: mode generateSW
9:37:31 PM: precache 72 entries (966.42 KiB)
9:37:31 PM: files generated
9:37:31 PM: dist/sw.js
9:37:31 PM: dist/workbox-e1498109.js
9:37:31 PM: warnings
9:37:31 PM: _nuxt/DMgFA9vS.js is 2.2 MB, and won’t be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
9:37:31 PM: [info] [nitro] Building Nuxt Nitro server (preset: netlify)
9:39:40 PM: ​
9:39:40 PM: “build.command” failed
9:39:40 PM: ────────────────────────────────────────────────────────────────
9:39:40 PM: ​
9:39:40 PM: Error message
9:39:40 PM: Command was killed with SIGKILL (Forced termination): nuxt build
9:39:40 PM: ​
9:39:40 PM: Error location
9:39:40 PM: In Build command from Netlify app:
9:39:40 PM: nuxt build
9:39:40 PM: ​
9:39:40 PM: Resolved config
9:39:40 PM: build:
9:39:40 PM: command: nuxt build
9:39:40 PM: commandOrigin: ui
9:39:40 PM: environment:
9:39:40 PM: - NODE_OPTIONS
9:39:40 PM: - NUXT_API_ROUTE_SECRET
9:39:40 PM: - NUXT_LIBRARY_OPEN_STATE
9:39:40 PM: - NUXT_MAILCHIMP_CLIENT_KEY
9:39:40 PM: - NUXT_MAILCHIMP_CLIENT_SECRET
9:39:40 PM: - NUXT_MAILCHIMP_KEY
9:39:40 PM: - NUXT_MAILCHIMP_LIST_ID
9:39:40 PM: - NUXT_MAILCHIMP_SERVER
9:39:40 PM: - NUXT_PUBLIC_ANNUAL_ACCESS_PRICE_ID
9:39:40 PM: - NUXT_PUBLIC_BASE_ACCESS_PRICE_ID
9:39:40 PM: - NUXT_PUBLIC_LIFETIME_ACCESS_PRICE_ID
9:39:40 PM: - NUXT_PUBLIC_STRIPE_BASE_URL
9:39:40 PM: - NUXT_PUBLIC_STRIPE_KEY
9:39:40 PM: - NUXT_PUBLIC_SUPABASE_KEY
9:39:40 PM: - NUXT_PUBLIC_SUPABASE_URL
9:39:40 PM: - NUXT_STRIPE_EARLYADOPTERS_CODE
9:39:40 PM: - NUXT_STRIPE_ENDPOINT_SECRET
9:39:40 PM: - NUXT_STRIPE_SECRET_KEY
9:39:40 PM: - NUXT_SUPABASE_SERVICE_KEY
9:39:40 PM: - PNPM_FLAGS
9:39:40 PM: publish: /opt/build/repo/dist
9:39:40 PM: publishOrigin: ui
9:39:40 PM: headers:
9:39:40 PM: - for: /_nuxt/builds/meta/*
values:
cache-control: public, max-age=31536000, immutable
- for: /_nuxt/builds/*
values:
cache-control: public, max-age=1, immutable
- for: /sw.js
values:
Cache-Control: public, max-age=0, must-revalidate
- for: /manifest.webmanifest
values:
Cache-Control: public, max-age=0, must-revalidate
Content-Type: application/manifest+json
- for: /_nuxt/*
values:
cache-control: public, max-age=31536000, immutable
redirects:
- from: /__nuxt_error
status: 200
to: /.netlify/functions/server
- from: /*
status: 200
to: /.netlify/functions/server
9:39:40 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:39:41 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
9:39:41 PM: Failing build: Failed to build site
9:39:41 PM: Finished processing build request in 3m6.187s

The build settings:

Thank you so much in advance.

I could be interpreting it wrong, but that looks like a memory issue.

Googling for “nuxt Command was killed with SIGKILL” leads to discussions that indicate the same:
https://www.reddit.com/r/Nuxt/comments/mh5154/nuxt_app_build_is_killed_on_production_via_sigkill/

Netlify’s support guide for memory issues is here:

Thank you for your help! Trying to understand why there were no memory issues a few days ago :slight_smile: and every build worked flawlessly.

The easiest solution was to build and deploy with Netlify CLI. Much quicker and there were no troubles at all.

I can’t answer that as I don’t work for Netlify and have zero visibility.

That’s one way to circumvent any difficulty you’re having with building on Netlify.

Another bonus is that it doesn’t consume build minutes.

Exactly. Thanks everyone!