nuxt: Deploys to netlify break after upgrading to 3.6.x

Environment

Reproduction

Repo with cleaned up branch

Branch cleanup is as far as I could make it while still reproducing the issue.

Describe the bug

When upgrading from Nuxt 3.5.3 to Nuxt 3.6.5 (also tested with 3.6.3 before), netlify deploys break,showing an error message.

9:47:02 PM: Functions bundling                                            
9:47:02 PM: ────────────────────────────────────────────────────────────────
9:47:02 PM: ​
9:47:02 PM: Packaging Functions from .netlify/functions-internal directory:
9:47:02 PM:  - server/server.mjs
9:47:02 PM: ​
9:47:02 PM: Packaging Functions from functions/api directory:
9:47:02 PM:  - login.ts
9:47:02 PM:  - verifylogin.ts
9:47:02 PM: ​
9:47:21 PM: <--- Last few GCs --->
9:47:21 PM: [4031:0x6145730]    42000 ms: Scavenge 2025.0 (2059.0) -> 2025.0 (2064.2) MB, 4.3 / 0.0 ms  (average mu = 0.149, current mu = 0.144) allocation failure;
9:47:21 PM: [4031:0x6145730]    42006 ms: Scavenge 2027.8 (2064.2) -> 2028.0 (2065.5) MB, 4.3 / 0.0 ms  (average mu = 0.149, current mu = 0.144) allocation failure;
9:47:21 PM: [4031:0x6145730]    42012 ms: Scavenge 2028.8 (2065.5) -> 2028.5 (2076.5) MB, 5.1 / 0.0 ms  (average mu = 0.149, current mu = 0.144) allocation failure;
9:47:21 PM: <--- JS stacktrace --->
9:47:21 PM: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
9:47:21 PM:  1: 0xb83f50 node::Abort() [/opt/buildhome/node-deps/node]
9:47:21 PM:  2: 0xa94834  [/opt/buildhome/node-deps/node]
9:47:21 PM:  3: 0xd647c0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/buildhome/node-deps/node]
9:47:21 PM:  4: 0xd64b67 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/buildhome/node-deps/node]
9:47:21 PM:  5: 0xf42265  [/opt/buildhome/node-deps/node]
9:47:21 PM:  6: 0xf43168 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/opt/buildhome/node-deps/node]
9:47:21 PM:  7: 0xf53673  [/opt/buildhome/node-deps/node]
9:47:21 PM:  8: 0xf544e8 
...

Additional context

No response

Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 5
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Hi, I was having the same issue in my project. But after many tests, I discovered that the google-fonts module was causing the error. When I set googleFonts { download: false } in nuxt.config, it resolved the issue for me.

How I found the solution briefly: I accessed .netlify\functions-internal\server\chunks\app_nuxt\entry-styles.mjs, deleted the value of the variable nuxtGoogleFonts, tried to deploy again, and everything worked fine.

Translated from Portuguese (Brazilian) by ChatGPT.

I had a similar problem. I was able to trace the problem back to some kind of incompatibility between normalize.css and the experimental inlineSSRStyles feature.

My solution is to either remove normalize.css or disable the inlineSSRStyles feature.

// https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ css: ['normalize.css/normalize.css','@/assets/styles/app.scss'], devtools: { enabled: true }, experimental: { inlineSSRStyles: false } })

Still happening with 3.7.1

@Nemure231 I suggest you do a cleanup when downgrading, e.g remove node_modules and package-lock.json and then do npm install.