Go path is relative on windows 10

I have been running go for a while. I installed a couple of packages (msys32 and mingw-w64) and I go back to using go and I get the message "go: GOPATH entry is relative; must be absolute path: “”. (in the command prompt). My GOPATH and PATH variables have not been changed, are all there, are absolute not relative. Can’t get around this. Any ideas? I’m completely stuck. I could uninstall those packages, but I’m not convinced they are causing it, and I will need them anyway.

1 Like

What Go version are you using?
And what does go env GOPATH return?

The message indicates that the Go tools cannot see the GOPATH for some reason (it seems to be an empty string “”). The strange thing about this is that if GOPATH is empty, then Go should fall back to the default GOPATH instead of complaining about an empty GOPATH. (Unless you use a Go version < 1.8, when there was no default GOPATH)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.