{
  "id": "nextjs/invalid-segment-config-export",
  "signature": "Error: Invalid segment config export. Only 'dynamic', 'dynamicParams', 'revalidate', 'fetchCache', 'runtime', 'preferredRegion', 'maxDuration' are allowed.",
  "signature_zh": "错误：无效的段配置导出。只允许 'dynamic', 'dynamicParams', 'revalidate', 'fetchCache', 'runtime', 'preferredRegion', 'maxDuration'。",
  "regex": "Invalid segment config export",
  "domain": "nextjs",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A page or layout exports a config object with an unsupported key (e.g., 'generateStaticParams' as a config key instead of a function, or a misspelled config name).",
  "root_cause_type": "generic",
  "root_cause_zh": "页面或布局导出了一个包含不受支持的键的配置对象（例如，将 'generateStaticParams' 作为配置键而不是函数，或拼写错误的配置名称）。",
  "versions": [
    {
      "version": "Next.js 13.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 14.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 15.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "generateStaticParams is a separate exported function, not a config key. It must be exported directly from the page file.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Even if the key is valid, the value must be supported; 'edge' requires specific configuration and may not be available in all deployments.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The framework validates config keys strictly; any unrecognized key triggers this error.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check the exported config object for any keys not in the allowed list. Remove or correct them. Ensure generateStaticParams is exported as a separate function, not inside the config.",
      "success_rate": 0.95,
      "how": "Check the exported config object for any keys not in the allowed list. Remove or correct them. Ensure generateStaticParams is exported as a separate function, not inside the config.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the official Next.js segment config documentation to verify allowed keys and correct spelling. If using TypeScript, define the config with a typed interface to catch errors at compile time.",
      "success_rate": 0.9,
      "how": "Use the official Next.js segment config documentation to verify allowed keys and correct spelling. If using TypeScript, define the config with a typed interface to catch errors at compile time.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Check the exported config object for any keys not in the allowed list. Remove or correct them. Ensure generateStaticParams is exported as a separate function, not inside the config.",
    "Use the official Next.js segment config documentation to verify allowed keys and correct spelling. If using TypeScript, define the config with a typed interface to catch errors at compile time."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-11-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}