# Attempted import error: 'ComponentName' is not exported from './module' (imported as 'ComponentName')

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

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| React 18.2.0 | active | — | — |
| React 17.0.2 | active | — | — |

## Workarounds

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').** (95% success)
   ```
   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.** (80% success)
   ```
   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.** (90% success)
   ```
   If using TypeScript, run 'tsc --noEmit' to check for export mismatches before building.
   ```

## Dead Ends

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