{
  "id": "nextjs/static-generation-timeout-path",
  "signature": "Error: Static generation timed out after 60 seconds for path '/[slug]'. Consider increasing the static generation timeout in next.config.js.",
  "signature_zh": "错误：路径 '/[slug]' 的静态生成在 60 秒后超时。考虑在 next.config.js 中增加静态生成超时时间。",
  "regex": "Error: Static generation timed out after 60 seconds for path '/\\[slug\\]'\\. Consider increasing the static generation timeout in next\\.config\\.js\\.",
  "domain": "nextjs",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "A page using generateStaticParams or static generation (output: 'export' or dynamicParams: false) took longer than the default 60-second timeout to generate all static pages. This is often due to slow data fetching or too many dynamic routes.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用 generateStaticParams 或静态生成（output: 'export' 或 dynamicParams: false）的页面生成所有静态页面耗时超过默认的 60 秒超时。这通常是由于数据获取缓慢或动态路由过多。",
  "versions": [
    {
      "version": "Next.js 14.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 15.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Setting dynamicParams: true in the page segment config to allow dynamic rendering for missed routes.",
      "why_fails": "This only affects runtime behavior for ungenerated routes, not the static generation timeout itself; the timeout still applies to the initial build.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Removing generateStaticParams entirely to let Next.js handle all routes dynamically.",
      "why_fails": "This changes the page to dynamic rendering, which may not be desired for SEO or performance; also, if output: 'export' is set, this will cause a build error.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Adding revalidate to the page's fetch calls to enable ISR, thinking it bypasses static generation timeout.",
      "why_fails": "ISR still requires initial static generation; the timeout applies to the first build, not runtime revalidation.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the static generation timeout in next.config.js using the experimental.staticGenerationTimeout option.",
      "success_rate": 0.9,
      "how": "Increase the static generation timeout in next.config.js using the experimental.staticGenerationTimeout option.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Optimize generateStaticParams to fetch data more efficiently. Use batch fetching, caching, or limit the number of paths returned.",
      "success_rate": 0.85,
      "how": "Optimize generateStaticParams to fetch data more efficiently. Use batch fetching, caching, or limit the number of paths returned.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using output: 'export', consider switching to partial prerendering or ISR for pages with many dynamic routes. Alternatively, use a custom build script to generate pages in batches.",
      "success_rate": 0.75,
      "how": "If using output: 'export', consider switching to partial prerendering or ISR for pages with many dynamic routes. Alternatively, use a custom build script to generate pages in batches.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在 next.config.js 中使用 experimental.staticGenerationTimeout 选项增加静态生成超时时间。",
    "优化 generateStaticParams 以更高效地获取数据。使用批量获取、缓存或限制返回的路径数量。",
    "如果使用 output: 'export'，考虑对具有许多动态路由的页面切换到部分预渲染或 ISR。或者，使用自定义构建脚本分批生成页面。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nextjs.org/docs/app/api-reference/next-config-js/staticGenerationTimeout",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}