{
  "id": "nextjs/invalid-app-path-param-type",
  "signature": "Error: Route \"[param]\" has invalid parameter type. Parameters must be strings or arrays of strings, but received number.",
  "signature_zh": "错误：路由 \"[param]\" 具有无效的参数类型。参数必须是字符串或字符串数组，但收到了数字。",
  "regex": "invalid parameter type",
  "domain": "nextjs",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "In dynamic routes (e.g., app/[slug]/page.tsx), the generateStaticParams function or the params object from the route returns a non-string value (e.g., number) for a parameter that Next.js expects to be a string.",
  "root_cause_type": "generic",
  "root_cause_zh": "在动态路由（例如 app/[slug]/page.tsx）中，generateStaticParams 函数或来自路由的 params 对象为参数返回了非字符串值（例如数字），而 Next.js 期望该参数是字符串。",
  "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": "Next.js requires params to be strings for URL construction; numbers cause type errors.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "TypeScript and runtime validation will throw an error if the value is not a string or array of strings.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The build will fail (if using static generation) or the route will not match correctly at runtime.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure generateStaticParams returns params as strings. Use String() or template literals to convert numbers.",
      "success_rate": 0.95,
      "how": "Ensure generateStaticParams returns params as strings. Use String() or template literals to convert numbers.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add TypeScript validation to ensure params are strings. Use a type guard or runtime check in the page component.",
      "success_rate": 0.9,
      "how": "Add TypeScript validation to ensure params are strings. Use a type guard or runtime check in the page component.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure generateStaticParams returns params as strings. Use String() or template literals to convert numbers.",
    "Add TypeScript validation to ensure params are strings. Use a type guard or runtime check in the page component."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nextjs.org/docs/app/api-reference/functions/generate-static-params",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-09-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}