vercel/next.js · error

`experimental.turbopackRustReactCompiler` requires `reactCom

Error message

`experimental.turbopackRustReactCompiler` requires `reactCompiler` to be enabled. Please add `reactCompiler: true` in ${configFileName}.

What it means

The Rust React Compiler implementation is an accelerator for the React Compiler, not a standalone feature. If `turbopackRustReactCompiler` is enabled but `reactCompiler` is not truthy, normalization throws telling you to enable reactCompiler first. Checked during build/dev phases only.

Source

Thrown at packages/next/src/server/config.ts:555

          `Please remove the option or run Next.js with webpack in ${configFileName}.`
      )
    }

    if (
      result.experimental.turbopackRustReactCompiler &&
      !process.env.TURBOPACK
    ) {
      throw new Error(
        `\`experimental.turbopackRustReactCompiler\` is only supported with Turbopack. ` +
          `Please remove the option or run Next.js with Turbopack in ${configFileName}.`
      )
    }

    if (
      result.experimental.turbopackRustReactCompiler &&
      !result.reactCompiler
    ) {
      throw new Error(
        `\`experimental.turbopackRustReactCompiler\` requires \`reactCompiler\` to be enabled. ` +
          `Please add \`reactCompiler: true\` in ${configFileName}.`
      )
    }
  }

  if (result.experimental.cachedNavigations && !result.cacheComponents) {
    throw new Error(
      `\`experimental.cachedNavigations\` requires \`cacheComponents\` to be enabled. Please update your ${configFileName} accordingly.`
    )
  }

  if (result.partialPrefetching && !result.cacheComponents) {
    throw new Error(
      `\`partialPrefetching\` requires \`cacheComponents\` to be enabled. Please update your ${configFileName} accordingly.`
    )
  }

View on GitHub (pinned to 0ae8c72462)

Solutions

  1. Add `reactCompiler: true` at the top level alongside the experimental flag
  2. Remove turbopackRustReactCompiler if you don't actually want the React Compiler

Example fix

// before
module.exports = { experimental: { turbopackRustReactCompiler: true } }
// after
module.exports = {
  reactCompiler: true,
  experimental: { turbopackRustReactCompiler: true }
}
Defensive patterns

Strategy: validation

Validate before calling

if (experimental.turbopackRustReactCompiler && !reactCompiler) {
  reactCompiler = true
}

Prevention

When it happens

Trigger: Setting `experimental: { turbopackRustReactCompiler: true }` without a top-level `reactCompiler: true`. Even on Turbopack, this combination is rejected.

Common situations: Enabling the experimental Rust flag alone, assuming it implies the compiler. Partially migrating config and missing the top-level reactCompiler key.

Related errors


AI-assisted analysis of vercel/next.js@0ae8c72462 (2026-08-06). Data as JSON: /api/errors/9b2c1849e0135611. Report an issue: GitHub.