{
  "id": "nextjs/dynamic-import-named-export-not-found",
  "signature": "Error: Dynamic import of 'X' failed: Module 'Y' does not contain a named export 'Z'.",
  "signature_zh": "错误：动态导入 'X' 失败：模块 'Y' 不包含命名导出 'Z'。",
  "regex": "Error: Dynamic import of '.*' failed: Module '.*' does not contain a named export '.*'\\.",
  "domain": "nextjs",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "A dynamic import using `next/dynamic` or `import()` specifies a named export (e.g., `{ MyComponent }`) that does not exist in the imported module. This often happens when the module exports a default export but no named export with that name, or the export name is misspelled.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用 `next/dynamic` 或 `import()` 的动态导入指定了一个在导入模块中不存在的命名导出（例如 `{ MyComponent }`）。这通常发生在模块导出默认导出但没有该名称的命名导出，或者导出名称拼写错误时。",
  "versions": [
    {
      "version": "Next.js 13.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 14.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 14.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 15.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The 'use client' directive does not add or change exports. If the named export does not exist, the import still fails. The issue is in the export definition, not the runtime environment.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error occurs at build time or during module resolution; a try-catch in runtime code does not prevent the initial load failure. The component will not render.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "If the module only has a named export, a default import will result in `undefined`. The component will not render correctly, though the error may change.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Correct the named export name to match the actual export in the module. Check the module file for the exact export name.",
      "success_rate": 0.95,
      "how": "Correct the named export name to match the actual export in the module. Check the module file for the exact export name.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the module exports a default export, use a default import without specifying a named export.",
      "success_rate": 0.9,
      "how": "If the module exports a default export, use a default import without specifying a named export.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add a named export to the module if it currently only has a default export. Re-export the default as a named export.",
      "success_rate": 0.85,
      "how": "Add a named export to the module if it currently only has a default export. Re-export the default as a named export.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "更正命名导出名称以匹配模块中的实际导出。检查模块文件以获得确切的导出名称。",
    "如果模块导出默认导出，则使用默认导入而不指定命名导出。",
    "如果模块目前只有默认导出，则向模块添加命名导出。将默认导出重新导出为命名导出。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-11-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}