{
  "id": "nextjs/parallel-route-missing-default-slot",
  "signature": "Error: Missing default.tsx for parallel route slot '@slot'. A default.tsx is required when the slot is not matched by the current route.",
  "signature_zh": "错误：并行路由插槽 '@slot' 缺少 default.tsx。当插槽未被当前路由匹配时，需要提供 default.tsx。",
  "regex": "Error: Missing default\\.tsx for parallel route slot '@[a-zA-Z0-9_-]+'\\. A default\\.tsx is required when the slot is not matched by the current route\\.",
  "domain": "nextjs",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "A parallel route slot (e.g., @modal) does not have a default.tsx file in its directory. When navigating to a route that does not match any file in that slot, Next.js requires a default.tsx to render fallback content.",
  "root_cause_type": "generic",
  "root_cause_zh": "并行路由插槽（例如 @modal）在其目录中没有 default.tsx 文件。当导航到与该插槽中任何文件都不匹配的路由时，Next.js 需要 default.tsx 来渲染回退内容。",
  "versions": [
    {
      "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": "Catch-all routes only work for dynamic segments, not for unmatched routes in parallel slots. The framework specifically looks for default.tsx to handle the fallback case.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This is an overreaction that removes the parallel routing feature entirely. It works but loses the architectural benefit of parallel routes, making it a poor practical fix.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Parallel route slots must be prefixed with @. A regular page.tsx will not be treated as a slot and will conflict with the parent route's page.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Create a default.tsx file in the slot directory. Example: // app/@modal/default.tsx export default function Default() { return null; } This renders nothing when the slot is unmatched.",
      "success_rate": 0.95,
      "how": "Create a default.tsx file in the slot directory. Example: // app/@modal/default.tsx export default function Default() { return null; } This renders nothing when the slot is unmatched.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you want fallback UI, create default.tsx with actual content: // app/@sidebar/default.tsx export default function Default() { return <div>Default sidebar content</div>; }",
      "success_rate": 0.95,
      "how": "If you want fallback UI, create default.tsx with actual content: // app/@sidebar/default.tsx export default function Default() { return <div>Default sidebar content</div>; }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the parallel route slot only in layouts that always match it, ensuring every route has a corresponding file in the slot. This avoids the need for default.tsx but is less flexible.",
      "success_rate": 0.7,
      "how": "Use the parallel route slot only in layouts that always match it, ensuring every route has a corresponding file in the slot. This avoids the need for default.tsx but is less flexible.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在插槽目录中创建 default.tsx 文件。示例：// app/@modal/default.tsx export default function Default() { return null; } 当插槽不匹配时，这将不渲染任何内容。",
    "如果需要回退 UI，请创建带有实际内容的 default.tsx：// app/@sidebar/default.tsx export default function Default() { return <div>默认侧边栏内容</div>; }",
    "仅在始终匹配的布局中使用并行路由插槽，确保每个路由在插槽中都有对应的文件。这避免了需要 default.tsx，但灵活性较差。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2024-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}