# django.db.migrations.exceptions.NodeNotFoundError: Migration myapp.0002_auto dependencies reference nonexistent parent node ('otherapp', '0001_initial')

- **ID:** `python/django-migration-dependency-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A migration depends on another migration that does not exist, possibly due to missing app or deleted migration.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Ensure all dependent apps have migrations** (90% success)
   ```
   Run python manage.py makemigrations otherapp
   ```
2. **Manually fix migration dependencies** (85% success)
   ```
   Edit the migration file to remove or correct the dependency.
   ```

## Dead Ends

- **Deleting the dependent migration** — May break migration chain. (80% fail)
- **Ignoring the error** — Migrations cannot run. (90% fail)
