You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
can't find $GOPATH/pkg/mod/github.com/go-openapi/spec@v0.21.0/swagger.go: no such file or directory #3140
can't find $HOME/pkg/mod/github.com/go-openapi/spec@v0.21.0/swagger.go: no such file or directory
install file from tags for linux amd64, rename it to swagger, make ln -s path/to/swagger/binary /usr/bin, try to generate golang code (swagger generate server) and it was successfull, but i can't build my project because when i try go build or go run it returns $GOPATH/pkg/mod/github.com/go-openapi/spec@v0.21.0/swagger.go: no such file or directory
Environment
swagger version: v0.31.0
commit: 77f973a
go version go1.23.2 linux/amd64
changed the title [-]can't find $HOME/pkg/mod/github.com/go-openapi/spec@v0.21.0/swagger.go: no such file or directory[/-][+]can't find $GOPATH/pkg/mod/github.com/go-openapi/spec@v0.21.0/swagger.go: no such file or directory[/+]on Nov 5, 2024
Activity
[-]can't find $HOME/pkg/mod/github.com/go-openapi/spec@v0.21.0/swagger.go: no such file or directory[/-][+]can't find $GOPATH/pkg/mod/github.com/go-openapi/spec@v0.21.0/swagger.go: no such file or directory[/+]fredbi commentedon Sep 3, 2025
You should make sure all dependency modules are on your system before generating code.
e.g. all github.com/go-openapi packages.