# go: -mod=vendor is set but vendor directory is missing or incomplete

- **ID:** `go/vendor-directory-missing`
- **Domain:** go
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The vendor directory does not exist or lacks required dependencies when using vendor mode.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.21 | active | — | — |
| 1.22 | active | — | — |
| 1.23 | active | — | — |

## Workarounds

1. **Run 'go mod vendor' to populate the vendor directory.** (95% success)
   ```
   Execute 'go mod vendor' in the module root to copy all dependencies.
   ```
2. **Use -mod=mod flag to bypass vendor mode.** (90% success)
   ```
   Build with 'go build -mod=mod' to use module cache instead of vendor.
   ```

## Dead Ends

- **Creating an empty vendor directory manually.** — Go expects the vendor directory to contain all dependencies; empty directory causes build failures. (100% fail)
- **Setting GOFLAGS=-mod=mod to ignore vendor.** — This works but doesn't fix the vendor issue; it's a workaround, not a fix. (30% fail)
