Error "missing go.sum entry for module providing package" in Go: causes and solution
Hello everyone! I'm new to Go and actively learning modules. I'm rewriting an old project on Buffalo and encountered an error that I can't understand.\n\nI have the following project structure:\n\n```\nmyapp/\n├── go.mod\n├── go.sum\n├── main.go\n└── actions/\n └── app.go\n```\n\nIn `go.mod` the dependencies are specified:\n```\nmodule myapp\n\ngo 1.21\n\nrequire (\n github.com/gobuffalo/buffalo v0.18.4\n github.com/gorilla/mux v1.8.0\n)\n```\n\nIn `main.go` I import:\n```go\npackage main\n\nimport (\n "github.com/gobuffalo/buffalo"\n "github.com/gorilla/mux"\n)\n```\n\nBut when I run `go build`, I get the error:\n```\nmissing go.sum entry for module providing package github.com/gorilla/mux\n```\n\nI tried:\n1. `go mod tidy` — didn't help.\n2. Deleted `go.sum` and ran `go mod download` — the error remains.
No answers yet.
Log in to leave an answer