nuxt/nuxt · error · Error

[nuxt] nuxt/entry was not replaced by a builder. Ensure a Nu

Error message

[nuxt] nuxt/entry was not replaced by a builder. Ensure a Nuxt builder (Vite, Webpack, or Rspack) is configured.

What it means

Default stub wired into `nuxt.buildOutputs.serverEntry` in `createNuxt`. It throws when the `nuxt/entry` specifier was never replaced by a builder plugin, meaning no Nuxt builder (Vite, Webpack, or Rspack) is configured. The stub exists so the SSR module graph can resolve `nuxt/entry` at build time and fail loudly instead of silently emitting an empty entry.

Source

Thrown at packages/nuxt/src/core/nuxt.ts:85

    hooks.callHookParallel = (...args) => runWithNuxtContext(nuxt, () => callHookParallel(...args))
  }
  hooks.callHookWith = (...args) => runWithNuxtContext(nuxt, () => callHookWith(...args))

  const nuxt: Nuxt = {
    __name: randomUUID(),
    _version: pkg.version,
    _asyncLocalStorageModule: options.experimental.debugModuleMutation ? new AsyncLocalStorage() : undefined,
    hooks,
    callHook: hooks.callHook,
    addHooks: hooks.addHooks,
    hook: hooks.hook,
    ready: () => runWithNuxtContext(nuxt, () => initNuxt(nuxt)),
    close: async () => { await hooks.callHook('close', nuxt) },
    vfs: {},
    apps: {},
    buildOutputs: {
      ssrStyles: () => 'export default {}',
      serverEntry: () => `export default () => { throw new Error('[nuxt] nuxt/entry was not replaced by a builder. Ensure a Nuxt builder (Vite, Webpack, or Rspack) is configured.') }`,
      clientManifest: () => 'export default {}',
      clientPrecomputed: () => 'export default undefined',
      entryChunkName: () => 'export const entryFileName = undefined',
      entryIds: () => 'export default []',
    },
    runWithContext: fn => runWithNuxtContext(nuxt, fn),
    options,
  }

  if (options.experimental.debugModuleMutation) {
    const proxiedOptions = new WeakMap<NuxtModule, NuxtOptions>()

    Object.defineProperty(nuxt, 'options', {
      get () {
        const currentModule = nuxt._asyncLocalStorageModule!.getStore()
        if (!currentModule) {
          return options
        }

View on GitHub (pinned to 11fb88e223)

Solutions

  1. Ensure a Nuxt builder is installed and registered (Vite by default via `@nuxt/vite-builder`).
  2. If using webpack/rspack, add `@nuxt/webpack-builder` / `@nuxt/rspack-builder` to the build modules.
  3. In a custom harness, import the builder's entry (or its `impl.ts`) before building.
  4. Verify `nuxt.config` does not disable/remove the builder module.

Example fix

// before: custom harness builds without a builder
const nuxt = await createNuxt({ ... })
await nuxt.build()

// after: register the Vite builder
import { NuxtViteBuilder } from '@nuxt/vite-builder'
// (or rely on the default builder by using the standard nuxt build pipeline)
Defensive patterns

Strategy: validation

Validate before calling

const builders = nuxt.options.modules?.some(m => /vite|webpack|rspack/i.test(String(m)))
if (!builders && !nuxt.options.builder) {
  throw new Error('No Nuxt builder (Vite/webpack/rspack) is configured')
}

Prevention

When it happens

Trigger: Building/running Nuxt without an active builder module registered, so `nuxt/entry` resolves to this throwing stub instead of the real Vue `createApp` entry.

Common situations: A custom Nuxt setup or test harness that constructs `createNuxt` and runs the build without installing/importing `@nuxt/vite-builder` (or the webpack/rspack equivalent); a misconfigured `modules`/`builder` selection; an integration that strips the builder module.

Related errors


AI-assisted analysis of nuxt/nuxt@11fb88e223 (2026-08-12). Data as JSON: /api/errors/bd1fd3a036cc1582. Report an issue: GitHub.