Repository navigation
fix(deps): upgrade nuxt to 4.7 with matching nitro and unhead - #705
Merged
Merged
Conversation
Nuxt 4.7 runs on Nitro v3 through @nuxt/nitro-v3-server, which needs the nitro 3.0.261103-rc release and @unhead/vue 3.5 together with its unhead core. - bump nuxt, nitro and @unhead/vue; add lru-cache, which Nitro 3 now resolves from the app for the og-image runtime cache - skip prerendering the content dump routes: the Nitro 3 prerenderer serves no public assets, the Worker serves them from ASSETS at runtime - point the server tsconfig at the @nuxt/content collection types - move the three server plugins from the legacy beforeResponse hook to Nitro's response hook, which fixes error pages losing their noindex - drop the ignored nitro externals option and an unused ts-expect-error - test PersonLink in the nuxt environment, as NuxtLink now renders inline
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
launchpad | f37d9d3 | Commit Preview URL Branch Preview URL |
Nov 28 2026, 05:55 PM |
@nuxt/content refills an empty D1 database through serverFetch. Nitro 3 runs that as a fresh request without the cloudflare runtime context, so the dump handler found no ASSETS binding and answered 404; the first render of a new deploy then failed with a hung worker. - add a server plugin that attaches env from cloudflare:workers to requests - type the default $fetch cast of the content fetch adapter precisely - reword the prerender ignore comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Renovate bumps for Nuxt 4.7 (#696), @unhead/vue 3.5.2 (#672) and the lock file maintenance (#613) all failed the production build, so none of them could merge. This PR does the upgrade as one coherent change, so those three become unnecessary.
Why the bumps broke
@nuxt/nitro-v3-server, which expects thenitro3.0.261103-rc release. The repo pinned an older beta without thenitro/kvexport, henceCould not resolve 'nitro/kv'in chore(deps): update dependency nuxt to v4.7.0 - autoclosed #696 and chore(deps): lock file maintenance #613.@unhead/vue3.5 needs the matchingunheadcore. Bumped alone, the core stayed older andprepareHeadInputwas not exported (chore(deps): update dependency @unhead/vue to v3.5.2 - autoclosed #672). Moving Nuxt,nitroand@unhead/vuetogether resolves both.What else moving to Nitro v3 needed
lru-cacheis added: Nitro 3 resolves the og-image runtime cache driver from the app and tried to install it itself.ASSETSat runtime, as before.responsehook instead of the legacybeforeResponsebridge. With the bridge, error pages came out indexable again (x-robots-tag: index); they arenoindex, no-storenow.@nuxt/contentcollection types, which Nitro v3 no longer picks up on its own.Verification
pnpm buildpasses,pnpm qualityshows no regression (186 / 17 / 3),pnpm testpasses (2417 tests).noindexon 404, dump route served by the Worker.wrangler devstart can fail once while the content database initialises; the following ones succeed. Worth a look on the first deploy.Supersedes #696, #672 and #613.