-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Hi everyone! Hope you're doing well
I'm currently working on updating project dependencies due to security alerts, and I'm trying to upgrade Nuxt to version 3.16.0 or 3.17.0. However, I'm running into issues during the build process.
❗ Problem with version 3.16.0+
When trying to build the project after upgrading to Nuxt 3.16.0+, I get this error:
[nuxi] ERROR Nuxt Build Error: ../../node_modules/nuxt/dist/app/entry.js (8:16): "appSpaLoaderAttrs" is not exported by "virtual:nuxt:/.../.nuxt/nuxt.config.mjs", imported by "../../node_modules/nuxt/dist/app/entry.js"
When updating to 3.17.0, I get a different error, which seems to be solvable with a workaround — but the original error from 3.16.0 still happens afterwards:
ERROR nuxt.options.experimental.extraPageMetaExtractionKeys is not iterable
Temporary workaround:
We can bypass the above by adding the following to our Nuxt config:
experimental: {
extraPageMetaExtractionKeys: []
}
However, after that, the build still fails with the same appSpaLoaderAttrs error from 3.16.0.
🔎 What we’ve tried
- Updated only nuxt, or all related @nuxt/* libraries to 3.16.0 / 3.17.0
- Tried both versions on a branch that uses an updated @nx/nuxt (18.3.5)
- Tried installing or updating the vite builder
- Cleaned .nuxt, node_modules, yarn.lock, reinstalled everything
- Tried both locally and in CI (same result)
We’re using Nx monorepo with @nx/nuxt, and this project includes multiple apps and shared libs.
💭 Suspicions
I believe this may be due to internal conflicts between different versions of @nuxt/kit or @nuxt/schema, especially with how Nx wraps the Nuxt config and injects the builder.
We've seen @nuxt/kit@3.15.4 and @nuxt/schema@3.14.x being pulled transitively even when we explicitly define 3.17.5 — possibly by @nuxt/test-utils, @nx/nuxt, or vitest-environment-nuxt.
🙏 What I need help with
- Has anyone else experienced this "appSpaLoaderAttrs" virtual module error when using Nuxt with Nx?
- Is this a known incompatibility with @nx/nuxt and Nuxt 3.16+?
- Should I postpone the upgrade until future versions of @nx/nuxt or Nuxt?
I’ve tried all combinations I could think of — I’d love to hear if someone has another idea or workaround.
Thanks in advance!