-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: cannot find module providing package go.uber.org/mock/mockgen/model: import lookup disabled by -mod=vendor #83
Comments
I ran into this same issue today 🐞 👍 |
I'm getting similar errors without It cannot find one of the application packages:
|
I think it was a somewhat unrelated issue. I tried upgrading 0.2.0 -> 0.3.0 and at the same time adding |
The same problem that ash2k encountered also happens to me. This occurs when both v0.2.0 and v0.3.0 are installed in the same environment. The problem can be solved by uninstalling either one of these versions. |
Switching to source mode instead of reflect mode resolved this for me. I ultimately had to switch to source mode anyways as I'm using generics in my interfaces now that v0.3.0 has been released. |
If you are using reflect mode, just make sure that you have installed the same version of this package as the one defined in your go.mod. |
Make sure the |
I'm having this issue and the mockgen version is the same between the binary and our go.mod yet it keeps on failing. It works fine under macOS but on our containers it fails consistently. |
It turns out that, one of the reasons, this fails is that on laptop we had copies of |
Actual behavior
Moving from
golang/mock
I got this error when running themockgen
command and using reflection:Expected behavior
This doesn't happen with
golang/mock
moduleTo Reproduce
go install go.uber.org/mock/mockgen@latest
mockgen -build_flags=-mod=vendor -destination=internal/testing/mock/mock_dynamodbiface.go -package=mock github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface DynamoDBAPI
Additional Information
reflect
v0.2.0
go version go1.21.1 darwin/arm64
Triage Notes for the Maintainers
The text was updated successfully, but these errors were encountered: