I've faced the same issue. In my case there was a module rename. go clean -modcache
, replace in go.mod, manual module name change in the go.mod did not help. I had to change all the links to the old module in the go code (import section of go files) and after that go mod tidy
did the job.