# 尝试导入错误：'ComponentName' 未从 './module' 中导出（作为 'ComponentName' 导入）

- **ID:** `react/import-missing-default-export`
- **领域:** react
- **类别:** module_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

导入的模块没有与导入语句匹配的命名导出，通常是由于缺少默认导出或导出语法错误。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| React 18.2.0 | active | — | — |
| React 17.0.2 | active | — | — |

## 解决方案

1. ```
   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').
   ```
2. ```
   Use a wildcard import to inspect all exports: 'import * as Module from './module'; console.log(Module);' to see available exports.
   ```
3. ```
   If using TypeScript, run 'tsc --noEmit' to check for export mismatches before building.
   ```

## 无效尝试

- **** — This does not fix the underlying export mismatch and causes the same error. (90% 失败率)
- **** — Named imports require named exports; default exports are imported differently. (70% 失败率)
- **** — This hides the error but does not resolve the missing export, causing runtime failures. (80% 失败率)
