# package example.com/user/project: cannot find package "example.com/user/project" in any of:
	/usr/local/go/src/example.com/user/project (from $GOROOT)
	/home/user/go/src/example.com/user/project (from $GOPATH)

- **ID:** `go/cannot-find-package-in-gopath`
- **Domain:** go
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The package is not located in the expected GOPATH or GOROOT directories, often because the project was not cloned into the correct GOPATH structure or modules are not enabled.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.0 | active | — | — |
| 1.1 | active | — | — |
| 1.2 | active | — | — |
| 1.3 | active | — | — |
| 1.4 | active | — | — |
| 1.5 | active | — | — |
| 1.6 | active | — | — |
| 1.7 | active | — | — |
| 1.8 | active | — | — |
| 1.9 | active | — | — |
| 1.10 | active | — | — |
| 1.11 | active | — | — |
| 1.12 | active | — | — |
| 1.13 | active | — | — |
| 1.14 | active | — | — |
| 1.15 | active | — | — |
| 1.16 | active | — | — |

## Workarounds

1. **Enable Go modules and initialize the module** (95% success)
   ```
   GO111MODULE=on go mod init example.com/user/project
   ```
2. **Move the project to the correct GOPATH location** (85% success)
   ```
   mkdir -p $GOPATH/src/example.com/user && mv /current/project $GOPATH/src/example.com/user/project
   ```

## Dead Ends

- **Setting GO111MODULE=off and hoping GOPATH resolves** — Disabling modules forces GOPATH mode, but if the project is not in the correct GOPATH src directory, it still fails. (70% fail)
- **Copying the project to GOROOT/src** — GOROOT is for the standard library; placing user projects there is unsupported and can cause conflicts. (90% fail)
