I create a new project from existing sources. I set the GOROOT for the project. GOPATH is set correctly. I've run go get and go mod tidy on the project. Running go build from the command line on one of the main.go files in the cmd/ directory builds a binary. (There are multiple main.go files in this project.)
Intellij shows every module in go.mod as an Unresolved Dependency. In .go files Intellij shows all imports that are not part of the Go installation as unresolved directories. This is on Windows.
Why is Intellij showing these errors when this project is structured properly and builds properly from the command line?