What this thread does
Do first: keep future.compatibilityVersion unset while migrating app and server plugins, and inventory each plugin's environment and injected dependencies before changing its location.
Short answer
As of November 2026, this recipe retains the Nuxt 4.6.2 migration baseline. The tagged package manifest declares Node runtime engines. Match it before installing; this is a plugin-focused migration, not a claim about the newest package tag.
Choose / don't choose
- Universal app plugin: choose for shared SSR/client injection; don't import browser-only libraries at module scope. Use the
.clientsuffix to load a plugin only on the client side (plugins). import.meta.clientbranch: choose for a browser-only portion of an otherwise universal plugin; don't expect it to protect a top-level browser-only import.- Nitro plugin: choose for request lifecycle hooks; don't store a user's request-specific Vue injection there (lifecycle).
Not for: diagnosing an unchanged app's hydration mismatch; see nuxt-4-fix-slow-page-or-hydration-mismatch.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
future.compatibilityVersion | Leave unset for the migration baseline; 5 opts into additional future defaults rather than merely repairing plugins | Tagged migration baseline | upgrade guide |
defineNuxtPlugin: name | Give the provider a stable name | Current app-plugin docs | plugins |
defineNuxtPlugin: dependsOn | Consumer lists the provider's name so its setup finishes first | Current app-plugin docs | plugins |
| Parallel plugins | Default sequential loading; set true only for independent initialization, retaining explicit dependsOn for dependencies | Current app-plugin docs | plugins |
.client.ts / .server.ts | Load the entire plugin only in the named environment | Current app-plugin docs | plugins |
nuxtApp.runWithContext | Call a function with an explicit Nuxt context | Current context docs | useNuxtApp |
Order of operations
1. Match modules and engines to the target. Review the directory migration rather than moving the entire tree: app code belongs under app/, while server/, public/, modules, layers stay at project root. The tagged upgrade guide also describes shallow fetch data and per-call deep: true for nested mutation. 2. Move Vue plugins to app/plugins/; name injection providers and add consumer dependsOn arrays. Split browser-only imports into .client.ts files. Keep server hooks in server/plugins/ using defineNitroPlugin. 3. Nitro plugins execute only once when the server starts; the lifecycle guide says they are not awaited. In serverless deployments startup may occur on request. Do not use an async Nitro plugin as an assumed request readiness barrier. Vue and Nuxt instances are created before app plugins run, then app:created fires; plugins with the .client suffix execute on the client side (lifecycle). 4. Call useNuxtApp() where the runtime context is available. Capture the app before an async boundary; use runWithContext sparingly for callbacks needing context. tryUseNuxtApp is appropriate only when absence is acceptable (context). 5. Retain h3 handlers until intentionally porting a route; if adopting portable helpers, import both defineEventHandler and helpers from nuxt/server. Build and exercise SSR, direct API requests, client navigation, injected services, cookies and redirects. The server API release establishes that adoption is optional.
Known failures and fixes
| Error (short quote) | Cause | Fix | Source |
|---|---|---|---|
useNuxtApp exception | Runtime context is unavailable in the calling scope | Move into setup/plugin context; capture nuxtApp and wrap the callback in runWithContext | context |
[NUXT_E8012] | A nuxt/server helper receives an h3 event | Import handler and helpers together from nuxt/server, or retain the full h3 path | tagged upgrade |
Historical upgrade context: the earlier bundler release changes bundler dependencies; review custom integrations. The target patch lists route and resolution repairs. In the end-of-life discussion, contributors describe directory confusion and a smoother compatibility-mode migration. In the directory RFC, non-app directories and shared types are discussed. These reports motivate inspecting path assumptions, without establishing plugin compatibility for every module.
Missing
- The linked sources confirm: Daniel Roe's end-of-life discussion; Resumane describes directory confusion; ngajhede describes a smoother compatibility-mode migration; ineshbose asks about non-app directories; danielroe clarifies root placement; danielroe clarifies shared types.
- The linked source does not confirm: the illustrative provider name 'api' and matching dependsOn=['api'] values.
- No app dependency inventory or module compatibility list is specified; a full breaking-change audit across all intermediate releases remains necessary for the actual starting version.
Started from a post by @nuxt, packaged by the editor. Original post