{"record":{"id":"9b2c1849e0135611","repo":"vercel/next.js","slug":"experimental-turbopackrustreactcompiler-requires","errorCode":null,"errorMessage":"`experimental.turbopackRustReactCompiler` requires `reactCompiler` to be enabled. Please add `reactCompiler: true` in ${configFileName}.","messagePattern":"`experimental\\.turbopackRustReactCompiler` requires `reactCompiler` to be enabled\\. Please add `reactCompiler: true` in (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":555,"sourceCode":"          `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(\n      `\\`experimental.cachedNavigations\\` requires \\`cacheComponents\\` to be enabled. Please update your ${configFileName} accordingly.`\n    )\n  }\n\n  if (result.partialPrefetching && !result.cacheComponents) {\n    throw new Error(\n      `\\`partialPrefetching\\` requires \\`cacheComponents\\` to be enabled. Please update your ${configFileName} accordingly.`\n    )\n  }\n","sourceCodeStart":537,"sourceCodeEnd":573,"githubUrl":"https://github.com/vercel/next.js/blob/0ae8c72462952df163f1b1e0726641bc5b40dc93/packages/next/src/server/config.ts#L537-L573","documentation":"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.","triggerScenarios":"Setting `experimental: { turbopackRustReactCompiler: true }` without a top-level `reactCompiler: true`. Even on Turbopack, this combination is rejected.","commonSituations":"Enabling the experimental Rust flag alone, assuming it implies the compiler. Partially migrating config and missing the top-level reactCompiler key.","solutions":["Add `reactCompiler: true` at the top level alongside the experimental flag","Remove turbopackRustReactCompiler if you don't actually want the React Compiler"],"exampleFix":"// before\nmodule.exports = { experimental: { turbopackRustReactCompiler: true } }\n// after\nmodule.exports = {\n  reactCompiler: true,\n  experimental: { turbopackRustReactCompiler: true }\n}","handlingStrategy":"validation","validationCode":"if (experimental.turbopackRustReactCompiler && !reactCompiler) {\n  reactCompiler = true\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set reactCompiler:true alongside turbopackRustReactCompiler","Treat the Rust flag as an accelerator of reactCompiler, never standalone"],"tags":["config","react-compiler","experimental"],"analyzedSha":"0ae8c72462952df163f1b1e0726641bc5b40dc93","analyzedAt":"2026-08-06T19:44:29.143Z","schemaVersion":2},"datasetVersion":"2026-08-07T02:17:10.218Z"}