Nuxt 3 build suddently fails building

Hi! i’m facing a build error.

2:50:56 PM: Functions bundling                                            
2:50:56 PM: ────────────────────────────────────────────────────────────────
2:50:56 PM: ​
2:50:56 PM: Packaging Functions from .netlify/functions-internal directory:
2:50:56 PM:  - server/server.mjs
2:50:56 PM: ​
2:50:56 PM: Packaging Functions from netlify/functions directory:
2:50:56 PM:  - index.js
2:50:56 PM:  - mailchimp.js
2:50:56 PM:  - getCollections/getCollections.js
2:50:56 PM: ​
2:50:56 PM: ✘ [ERROR] No matching export in ".netlify/functions-internal/server/main.mjs" for import "default"
2:50:56 PM:     .netlify/functions-internal/server/server.mjs:1:9:
2:50:56 PM:       1 │ export { default } from "./main.mjs";
2:50:56 PM:         ╵          ~~~~~~~
2:50:56 PM: ​
2:50:56 PM: Bundling of function "server" failed                          
2:50:56 PM: ────────────────────────────────────────────────────────────────
2:50:56 PM: ​
2:50:56 PM:   Error message
2:50:56 PM:   Build failed with 1 error:
2:50:56 PM:   .netlify/functions-internal/server/server.mjs:1:9: ERROR: No matching export in ".netlify/functions-internal/server/main.mjs" for import "default"
2:50:56 PM: ​
2:50:56 PM:   Error location
2:50:56 PM:   While bundling function "server"
2:50:56 PM: ​

the site is https://doncactus-shopify.netlify.app

the last builds worked without any problem

the AI assistant doesn’t provide any solution.

I’ve tried updating the node version, downgradng, changing from yarn to npm, updating versions, updating netlify-cli.

if i run yarn build locally it builds.
if i run netlify build it builds.
if i run netlify depoloy it fails.

please HELP

That Function is generated by Nuxt. Please report the issue to them.

i thought that since the function is in .netlify/functions-internal and since it works locally, it could be a netlify issue…

I also tried to deploy the same project on Vercel and it works without problems :person_shrugging:

Nuxt has an adapter per platform. Sometimes they release an update that breaks on one platform, but not on others.

1 Like

Just in case someone runs into my same issue.
The problem was caused by compatibilityDate in the nuxt config file.
the only date that works is 2024-04-03