Skip to content

Nuxt app fully broken with Nuxt 4.6.2 and compatibilityVersion: 5 #4175

Open

Description

@MickL

Environment

|                      |                       |
| -------------------- | --------------------- |
| **Operating system** | `macOS 27.0.0`        |
| **CPU**              | `Apple M4 (10 cores)` |
| **Node.js version**  | `v24.22.1`            |
| **nuxt/cli version** | `4.0.1`               |
| **Package manager**  | `bun@1.4.2`           |
| **Nuxt version**     | `4.6.2`               |
| **Nitro version**    | `2.13.5`              |
| **Builder**          | `vite@8.3.5`          |
| **Config**           | `-`                   |
| **Modules**          | `-`                   |

Reproduction

Describe the bug

The dev server doesnt start with Nuxt 4.6.2 and compatibilityVersion: 5

[nitro]  ERROR  RollupError: ../../node_modules/.bun/@nuxtjs+i18n@10.6.0+76ccdd62dc937518/node_modules/@nuxtjs/i18n/dist/runtime/shared/utils.js (1:9): "useRuntimeConfig" is not exported by "virtual:#imports", imported by "../../node_modules/.bun/@nuxtjs+i18n@10.6.0+76ccdd62dc937518/node_modules/@nuxtjs/i18n/dist/runtime/shared/utils.js".
import { useRuntimeConfig } from "#imports";
             ^
import { isString } from "@intlify/shared";
export function useRuntimeI18n(nuxtApp, event) {

Additional context

With compatibilityVersion: 5, Nuxt 4.6 turns Nitro auto imports off by default, so Nitro's import presets (including useRuntimeConfig) are removed from the server-side #imports but @nuxtjs/i18n is still importing from #imports

Fix

Replace imports from #imports with explicit imports from nuxt/server. E.g. see https://github.com/nuxt/image/pull/2281/changes#diff-8536b4cc99b3062f0c84a88d2b6c159d07052cd7736ab567b710f57e341b4cfa

Workaround

Until this issue is fixed, set in nuxt.config:

experimental: {
   nitroAutoImports: true, // TODO: Remove when this is resolved: https://github.com/nuxt-modules/i18n/issues/4175
}

Logs

Activity

  1. caiotarifa commented on Oct 28, 2026

    @caiotarifa

    I can confirm the issue, same problem here.

    Workaround:

    nitro: {
      imports: {
        imports: [{ name: 'useRuntimeConfig', from: 'nitropack/runtime' }]
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions