# Attempted import error: 'ComponentName' is not exported from './module'

- **ID:** `react/missing-export-default-component`
- **Domain:** react
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 92%

## Root Cause

Component or function referenced in import statement is either not exported, exported as default but imported as named, or the file path is incorrect.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| webpack 5.88.0 | active | — | — |
| create-react-app 5.0.1 | active | — | — |
| vite 4.4.0 | active | — | — |

## Workarounds

1. **Check the export statement in the module file. If it uses 'export default ComponentName', use default import: 'import ComponentName from "./module"'. If it uses 'export { ComponentName }', use named import: 'import { ComponentName } from "./module"'.** (95% success)
   ```
   Check the export statement in the module file. If it uses 'export default ComponentName', use default import: 'import ComponentName from "./module"'. If it uses 'export { ComponentName }', use named import: 'import { ComponentName } from "./module"'.
   ```
2. **Verify the file path relative to the importing file. Use './' for same directory, '../' for parent. Ensure file extension is omitted or correct (webpack handles .js/.jsx/.ts/.tsx).** (90% success)
   ```
   Verify the file path relative to the importing file. Use './' for same directory, '../' for parent. Ensure file extension is omitted or correct (webpack handles .js/.jsx/.ts/.tsx).
   ```

## Dead Ends

- **** — The error is static; restarting doesn't change the module's export statements. (95% fail)
- **** — If the import uses named syntax, adding default export doesn't fix it; may cause export ambiguity. (80% fail)
