{
  "id": "react/import-missing-default-export",
  "signature": "Attempted import error: 'ComponentName' is not exported from './module' (imported as 'ComponentName')",
  "signature_zh": "尝试导入错误：'ComponentName' 未从 './module' 中导出（作为 'ComponentName' 导入）",
  "regex": "Attempted import error: '[A-Za-z]+' is not exported from '[^']+' \\(imported as '[A-Za-z]+'\\)",
  "domain": "react",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "The imported module does not have a named export matching the import statement, often due to a missing default export or incorrect export syntax.",
  "root_cause_type": "generic",
  "root_cause_zh": "导入的模块没有与导入语句匹配的命名导出，通常是由于缺少默认导出或导出语法错误。",
  "versions": [
    {
      "version": "React 18.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "React 17.0.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This does not fix the underlying export mismatch and causes the same error.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Named imports require named exports; default exports are imported differently.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This hides the error but does not resolve the missing export, causing runtime failures.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check the module's export statement. If it uses 'export default', change the import to 'import ComponentName from './module''. If it uses named exports, ensure the export name matches (e.g., 'export const ComponentName').",
      "success_rate": 0.95,
      "how": "Check the module's export statement. If it uses 'export default', change the import to 'import ComponentName from './module''. If it uses named exports, ensure the export name matches (e.g., 'export const ComponentName').",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a wildcard import to inspect all exports: 'import * as Module from './module'; console.log(Module);' to see available exports.",
      "success_rate": 0.8,
      "how": "Use a wildcard import to inspect all exports: 'import * as Module from './module'; console.log(Module);' to see available exports.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using TypeScript, run 'tsc --noEmit' to check for export mismatches before building.",
      "success_rate": 0.9,
      "how": "If using TypeScript, run 'tsc --noEmit' to check for export mismatches before building.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Check the module's export statement. If it uses 'export default', change the import to 'import ComponentName from './module''. If it uses named exports, ensure the export name matches (e.g., 'export const ComponentName').",
    "Use a wildcard import to inspect all exports: 'import * as Module from './module'; console.log(Module);' to see available exports.",
    "If using TypeScript, run 'tsc --noEmit' to check for export mismatches before building."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://react.dev/learn/importing-and-exporting-components",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}