vercel/next.js · error

`experimental.turbopackRustReactCompiler` is only supported

Error message

`experimental.turbopackRustReactCompiler` is only supported with Turbopack. Please remove the option or run Next.js with Turbopack in ${configFileName}.

What it means

`experimental.turbopackRustReactCompiler` selects the native (Rust) React Compiler implementation, which only exists for Turbopack. If the flag is set and `process.env.TURBOPACK` is falsy, normalization throws. This check runs only during build/dev phases, not `next start`.

Source

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

      throw new Error(
        `\`experimental.cssChunking: "strict"\` is only supported with webpack. ` +
          `Please remove the option or run Next.js with webpack in ${configFileName}.`
      )
    }
    // Only error when `false` was set explicitly. `undefined` (the default) also resolves to
    // `'off'` but that's the implicit default and must not error on Turbopack.
    if (cssChunkingValue === false && process.env.TURBOPACK) {
      throw new Error(
        `\`experimental.cssChunking: false\` is only supported with webpack. ` +
          `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(

View on GitHub (pinned to 0ae8c72462)

Solutions

  1. Run with Turbopack (drop `--webpack`)
  2. Remove turbopackRustReactCompiler if you must stay on webpack

Example fix

// before
// next build --webpack
module.exports = { experimental: { turbopackRustReactCompiler: true } }
// after
module.exports = { experimental: { turbopackRustReactCompiler: true } }
// run: next build  (Turbopack)
Defensive patterns

Strategy: validation

Validate before calling

const isTurbopack = Boolean(process.env.TURBOPACK)
if (experimental.turbopackRustReactCompiler && !isTurbopack) {
  delete experimental.turbopackRustReactCompiler
}

Prevention

When it happens

Trigger: Setting `experimental: { turbopackRustReactCompiler: true }` and running `next build`/`next dev` with webpack (`--webpack`).

Common situations: Enabling the Rust React Compiler for speed but running a webpack build in CI. Copying experimental flags from a Turbopack-first project.

Related errors


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