# Error: Dynamic import of 'X' failed: Module 'Y' does not contain a named export 'Z'.

- **ID:** `nextjs/dynamic-import-named-export-not-found`
- **Domain:** nextjs
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

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

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Next.js 13.5 | active | — | — |
| Next.js 14.0 | active | — | — |
| Next.js 14.2 | active | — | — |
| Next.js 15.0 | active | — | — |

## Workarounds

1. **Correct the named export name to match the actual export in the module. Check the module file for the exact export name.** (95% success)
   ```
   Correct the named export name to match the actual export in the module. Check the module file for the exact export name.
   ```
2. **If the module exports a default export, use a default import without specifying a named export.** (90% success)
   ```
   If the module exports a default export, use a default import without specifying a named export.
   ```
3. **Add a named export to the module if it currently only has a default export. Re-export the default as a named export.** (85% success)
   ```
   Add a named export to the module if it currently only has a default export. Re-export the default as a named export.
   ```

## Dead Ends

- **** — 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. (85% fail)
- **** — 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. (90% fail)
- **** — 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. (70% fail)
