vercel/next.js · error

`experimental.turbopackGenerateComponentChunks` has been mov

Error message

`experimental.turbopackGenerateComponentChunks` has been moved to `experimental.turbopackChunking.generateComponentChunks`. Please update your ${configFileName} file accordingly.

What it means

Thrown at config.ts:2071 when `experimental.turbopackGenerateComponentChunks` is present in the user config. The option was relocated under a nested object; the old flat key is no longer accepted and must be moved to `experimental.turbopackChunking.generateComponentChunks`. This runs during the schema pre-validation phase on `userConfig`.

Source

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

    // Check deprecation warnings on the actual user config before merging with defaults
    checkDeprecations(userConfig, configFileName, silent, dir)

    if (
      userConfig.supportsImmutableAssets === undefined &&
      userConfig.experimental?.supportsImmutableAssets !== undefined
    ) {
      userConfig.supportsImmutableAssets =
        userConfig.experimental.supportsImmutableAssets
    }

    // `experimental.turbopackGenerateComponentChunks` has moved into
    // `experimental.turbopackChunking.generateComponentChunks`.
    if (
      (userConfig.experimental as any)?.turbopackGenerateComponentChunks !==
      undefined
    ) {
      throw new Error(
        `\`experimental.turbopackGenerateComponentChunks\` has been moved to \`experimental.turbopackChunking.generateComponentChunks\`. Please update your ${configFileName} file accordingly.`
      )
    }

    // `experimental.turbopackChunkingHeuristics` has been renamed to
    // `experimental.turbopackChunking`.
    if (
      (userConfig.experimental as any)?.turbopackChunkingHeuristics !==
      undefined
    ) {
      throw new Error(
        `\`experimental.turbopackChunkingHeuristics\` has been renamed to \`experimental.turbopackChunking\`. Please update your ${configFileName} file accordingly.`
      )
    }

    // Always validate the config against schema in non minimal mode
    if (!process.env.NEXT_MINIMAL && !silent) {
      await validateConfigSchema(

View on GitHub (pinned to 0ae8c72462)

Solutions

  1. Move the value to `experimental.turbopackChunking.generateComponentChunks`.
  2. If you no longer need the option, remove it entirely.

Example fix

// before
module.exports = { experimental: { turbopackGenerateComponentChunks: true } }
// after
module.exports = { experimental: { turbopackChunking: { generateComponentChunks: true } } }
Defensive patterns

Strategy: validation

Validate before calling

if ((config.experimental as any)?.turbopackGenerateComponentChunks !== undefined) {
  throw new Error('Move to experimental.turbopackChunking.generateComponentChunks');
}

Type guard

function usesNewChunkingKey(exp: any): boolean {
  return exp?.turbopackGenerateComponentChunks === undefined;
}

Prevention

When it happens

Trigger: A config containing `experimental: { turbopackGenerateComponentChunks: true }`; upgrading Next.js without updating the experimental Turbopack flags.

Common situations: Upgrading Next.js major/minor versions where Turbopack chunking options were reorganized; copying old examples.

Related errors


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