-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
go generate gives missing go sum entry for module errors #1483
Comments
In my case I get next error in gitlab runner: |
upon further debugging it seems that when i manually run |
In my gitlab ci i fixed build issue like this. Second line might not be relevant for you.
|
I'm experiencing the same problem with g1.16. I usually run via
I also can install the missing dependency with |
I figure that's a general bug in Go 1.16: golang/go#44129 - I have troubles with other dependencies, too. |
@JonasDoe @peter9207 |
I use Go 1.17 and have the same issue. |
Same with go 1.17 |
Deleting go.sum fixed it. |
Same issue here by the way, using gqlgen version 0.14.0, and Go version 1.17. No matter what, none of the solutions mentioned above work. Completely confused as to what the issue is! Any help would be greatly appreciated! |
Same issue here. |
Something that works for me regarding the missing cmd package: in |
import _ "github.com/99designs/gqlgen/cmd" |
I fixed with "go get -u github.com/99designs/gqlgen/cmd" |
Before every run of |
Where should I add the following "//go:generate ..."? |
When you follow the tutorial, you end up with a folder
|
Actually this from the introduction page fixed it for me, even though I did not have the time to find out what it's actually doing:
|
Actually, I believe not. All here is just workarounds. The problem seems in the generate script and the package handling of gqlgen itself rooted. |
@Diabolarius what you're saying is not on my projects. Can you create a repro? I'll be happy to help you. |
Please write here if the problem persists. |
This works for me though I don't know what it does
|
And yeah, it helped me, too |
THIS IS THE ANSWER. Without this the packet do not work |
What happened?
running
go generate ./...
gives go package errors
if i run
go get
on each of these dependencies the error goes away and i can generate files just fine, but they come back after 1-2 days. so its quite annoying to keep having to run these.I've spoken to a couple of people who used gqlgen before and none of them had any problems so I'm sure its not a super big deal. But just looking to get some help to get rid of these errors.
What did you expect?
go generate to generate the files without these errors
Minimal graphql.schema and models to reproduce
this happens with even the default generated schema
versions
gqlgen version
? v0.13.0go version
? go1.16beta1 darwin/arm64The text was updated successfully, but these errors were encountered: