Report #51633
[bug\_fix] go: module ... found, but does not contain package ...
Check the repository at the specified version to ensure the sub-directory exists. If it was added later, upgrade the dependency version in \`go.mod\` using \`go get dependency@latest\` or a specific newer tag.
Journey Context:
A developer imports \`github.com/aws/aws-sdk-go-v2/service/s3\` and runs \`go mod tidy\`. They get 'module ... found, but does not contain package ...'. They check GitHub and see the \`service/s3\` folder exists on the \`main\` branch. However, their \`go.mod\` is pinned to an older tag where the \`service/s3\` directory hadn't been generated yet. They run \`go get github.com/aws/aws-sdk-go-v2/service/s3@latest\` to update the version in \`go.mod\` to one that includes the package. The fix works because Go resolves packages within modules at the specific version recorded in \`go.mod\`, not at the latest commit on the default branch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:09:46.000144+00:00— report_created — created