{"record":{"id":"6782f87dc4bd6d85","repo":"vercel/next.js","slug":"experimental-turbopackchunkingheuristics-has-bee","errorCode":null,"errorMessage":"`experimental.turbopackChunkingHeuristics` has been renamed to `experimental.turbopackChunking`. Please update your ${configFileName} file accordingly.","messagePattern":"`experimental\\.turbopackChunkingHeuristics` has been renamed to `experimental\\.turbopackChunking`\\. Please update your (.+?) file accordingly\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":2082,"sourceCode":"\n    // `experimental.turbopackGenerateComponentChunks` has moved into\n    // `experimental.turbopackChunking.generateComponentChunks`.\n    if (\n      (userConfig.experimental as any)?.turbopackGenerateComponentChunks !==\n      undefined\n    ) {\n      throw new Error(\n        `\\`experimental.turbopackGenerateComponentChunks\\` has been moved to \\`experimental.turbopackChunking.generateComponentChunks\\`. Please update your ${configFileName} file accordingly.`\n      )\n    }\n\n    // `experimental.turbopackChunkingHeuristics` has been renamed to\n    // `experimental.turbopackChunking`.\n    if (\n      (userConfig.experimental as any)?.turbopackChunkingHeuristics !==\n      undefined\n    ) {\n      throw new Error(\n        `\\`experimental.turbopackChunkingHeuristics\\` has been renamed to \\`experimental.turbopackChunking\\`. Please update your ${configFileName} file accordingly.`\n      )\n    }\n\n    // Always validate the config against schema in non minimal mode\n    if (!process.env.NEXT_MINIMAL && !silent) {\n      await validateConfigSchema(\n        userConfig,\n        configFileName,\n        curLog.warn,\n        (messages) => {\n          // Capture validation messages for MCP error reporting\n          if (messages.length > 0) {\n            const fullMessage = messages.join('\\n')\n            NextInstanceErrorState.nextConfig.push(new Error(fullMessage))\n          }\n        }\n      )","sourceCodeStart":2064,"sourceCodeEnd":2100,"githubUrl":"https://github.com/vercel/next.js/blob/0ae8c72462952df163f1b1e0726641bc5b40dc93/packages/next/src/server/config.ts#L2064-L2100","documentation":"Thrown at config.ts:2082 when `experimental.turbopackChunkingHeuristics` is present in the user config. The option was renamed (and restructured) to `experimental.turbopackChunking`. The old key is rejected outright during config normalization.","triggerScenarios":"A config containing `experimental: { turbopackChunkingHeuristics: true }` or any value for that key; upgrading Next.js without migrating Turbopack heuristic flags.","commonSituations":"Version upgrade where the heuristic flag was folded into the new `turbopackChunking` object; stale examples in tutorials.","solutions":["Rename to `experimental.turbopackChunking` and nest the relevant sub-options there.","Remove the key if the chunking behavior is no longer being customized."],"exampleFix":"// before\nmodule.exports = { experimental: { turbopackChunkingHeuristics: true } }\n// after\nmodule.exports = { experimental: { turbopackChunking: {} } }","handlingStrategy":"validation","validationCode":"if ((config.experimental as any)?.turbopackChunkingHeuristics !== undefined) {\n  throw new Error('Rename to experimental.turbopackChunking');\n}","typeGuard":"function noOldHeuristicsKey(exp: any): boolean {\n  return exp?.turbopackChunkingHeuristics === undefined;\n}","tryCatchPattern":null,"preventionTips":["Grep for `turbopackChunkingHeuristics` after version upgrades.","Keep experimental Turbopack options grouped under `turbopackChunking`."],"tags":["config","turbopack","experimental","migration","deprecation"],"analyzedSha":"0ae8c72462952df163f1b1e0726641bc5b40dc93","analyzedAt":"2026-08-06T19:44:29.143Z","schemaVersion":2},"datasetVersion":"2026-08-07T02:17:10.218Z"}