{"record":{"id":"ea6e886011d7f210","repo":"vercel/next.js","slug":"experimental-turbopackrustreactcompiler-is-only","errorCode":null,"errorMessage":"`experimental.turbopackRustReactCompiler` is only supported with Turbopack. Please remove the option or run Next.js with Turbopack in ${configFileName}.","messagePattern":"`experimental\\.turbopackRustReactCompiler` is only supported with Turbopack\\. Please remove the option or run Next\\.js with Turbopack in (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":545,"sourceCode":"      throw new Error(\n        `\\`experimental.cssChunking: \"strict\"\\` is only supported with webpack. ` +\n          `Please remove the option or run Next.js with webpack in ${configFileName}.`\n      )\n    }\n    // Only error when `false` was set explicitly. `undefined` (the default) also resolves to\n    // `'off'` but that's the implicit default and must not error on Turbopack.\n    if (cssChunkingValue === false && process.env.TURBOPACK) {\n      throw new Error(\n        `\\`experimental.cssChunking: false\\` is only supported with webpack. ` +\n          `Please remove the option or run Next.js with webpack in ${configFileName}.`\n      )\n    }\n\n    if (\n      result.experimental.turbopackRustReactCompiler &&\n      !process.env.TURBOPACK\n    ) {\n      throw new Error(\n        `\\`experimental.turbopackRustReactCompiler\\` is only supported with Turbopack. ` +\n          `Please remove the option or run Next.js with Turbopack in ${configFileName}.`\n      )\n    }\n\n    if (\n      result.experimental.turbopackRustReactCompiler &&\n      !result.reactCompiler\n    ) {\n      throw new Error(\n        `\\`experimental.turbopackRustReactCompiler\\` requires \\`reactCompiler\\` to be enabled. ` +\n          `Please add \\`reactCompiler: true\\` in ${configFileName}.`\n      )\n    }\n  }\n\n  if (result.experimental.cachedNavigations && !result.cacheComponents) {\n    throw new Error(","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/vercel/next.js/blob/0ae8c72462952df163f1b1e0726641bc5b40dc93/packages/next/src/server/config.ts#L527-L563","documentation":"`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`.","triggerScenarios":"Setting `experimental: { turbopackRustReactCompiler: true }` and running `next build`/`next dev` with webpack (`--webpack`).","commonSituations":"Enabling the Rust React Compiler for speed but running a webpack build in CI. Copying experimental flags from a Turbopack-first project.","solutions":["Run with Turbopack (drop `--webpack`)","Remove turbopackRustReactCompiler if you must stay on webpack"],"exampleFix":"// before\n// next build --webpack\nmodule.exports = { experimental: { turbopackRustReactCompiler: true } }\n// after\nmodule.exports = { experimental: { turbopackRustReactCompiler: true } }\n// run: next build  (Turbopack)","handlingStrategy":"validation","validationCode":"const isTurbopack = Boolean(process.env.TURBOPACK)\nif (experimental.turbopackRustReactCompiler && !isTurbopack) {\n  delete experimental.turbopackRustReactCompiler\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only set turbopackRustReactCompiler in Turbopack builds","Branch config on process.env.TURBOPACK for bundler-specific flags"],"tags":["config","react-compiler","turbopack","bundlers","experimental"],"analyzedSha":"0ae8c72462952df163f1b1e0726641bc5b40dc93","analyzedAt":"2026-08-06T19:44:29.143Z","schemaVersion":2},"datasetVersion":"2026-08-07T02:17:10.218Z"}