vercel/next.js · error

The CLI flag "${cliServerFastRefresh === false ? '--no-serve

Error message

The CLI flag "${cliServerFastRefresh === false ? '--no-server-fast-refresh' : '--server-fast-refresh'}" conflicts with "experimental.turbopackServerFastRefresh: ${configServerFastRefresh}" in your Next.js config. The CLI flag will take precedence.

What it means

Error "The CLI flag "${cliServerFastRefresh === false ? '--no-server-fast-refresh' : '--server-fast-refresh'}" conflicts with "experimental.turbopackServerFastRefresh: ${configServerFastRefresh}" in your Next.js config. The CLI flag will take precedence." thrown in vercel/next.js.

Source

Thrown at packages/next/src/server/lib/router-server.ts:232

    const setupDevBundlerSpan = opts.startServerSpan
      ? opts.startServerSpan.traceChild('setup-dev-bundler')
      : trace('setup-dev-bundler')

    // In development, it's always the complete config.
    let developmentConfig = config as NextConfigComplete

    // Resolve the effective serverFastRefresh value.
    // Both default to enabled (true). CLI takes precedence over config.
    const cliServerFastRefresh = opts.serverFastRefresh
    const configServerFastRefresh =
      developmentConfig.experimental?.turbopackServerFastRefresh
    let effectiveServerFastRefresh: boolean | undefined
    if (
      cliServerFastRefresh !== undefined &&
      configServerFastRefresh !== undefined &&
      cliServerFastRefresh !== configServerFastRefresh
    ) {
      Log.warn(
        `The CLI flag "${cliServerFastRefresh === false ? '--no-server-fast-refresh' : '--server-fast-refresh'}" conflicts with "experimental.turbopackServerFastRefresh: ${configServerFastRefresh}" in your Next.js config. The CLI flag will take precedence.`
      )
      effectiveServerFastRefresh = cliServerFastRefresh
    } else {
      // Default to true when neither CLI nor config specifies a value.
      effectiveServerFastRefresh =
        cliServerFastRefresh ?? configServerFastRefresh ?? true
    }

    let developmentBundler = await setupDevBundlerSpan.traceAsyncFn(() =>
      setupDevBundler({
        // Passed here but the initialization of this object happens below, doing the initialization before the setupDev call breaks.
        renderServer,
        appDir,
        pagesDir,
        telemetry,
        fsChecker,
        dir: opts.dir,

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Remove either the CLI flag or `experimental.turbopackServerFastRefresh` from the config so they agree.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/next/src/server/lib/router-server.ts:232 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/4653429700ba724f. Report an issue: GitHub.