# go: module github.com/foo/bar@latest: module not found

- **ID:** `go/go-mod-tidy-module-not-found`
- **Domain:** go
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 92%

## Root Cause

The specified module version does not exist in the module proxy or repository, often due to a typo or unpublished version.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Go 1.20 | active | — | — |
| Go 1.21 | active | — | — |
| Go 1.22 | active | — | — |

## Workarounds

1. **Verify the module path and version: run 'go list -m github.com/foo/bar@latest' to check if the module exists.** (85% success)
   ```
   Verify the module path and version: run 'go list -m github.com/foo/bar@latest' to check if the module exists.
   ```
2. **Use a specific version instead of @latest: 'go get github.com/foo/bar@v1.2.3' after confirming the version exists.** (90% success)
   ```
   Use a specific version instead of @latest: 'go get github.com/foo/bar@v1.2.3' after confirming the version exists.
   ```
3. **Clear module cache and retry: 'go clean -modcache' then 'go mod tidy'** (75% success)
   ```
   Clear module cache and retry: 'go clean -modcache' then 'go mod tidy'
   ```

## Dead Ends

- **** — The -e flag only continues despite errors, but the module still won't be found, leaving the build broken. (80% fail)
- **** — Does not resolve the missing module; go mod tidy will still fail. (60% fail)
- **** — If the module is not found locally or on the proxy, this will not help; it may even worsen the situation by disabling proxy entirely. (70% fail)
