DEV Community

Gilbert Ngeno
Gilbert Ngeno

Posted on

Answer: "package XXX is not in GOROOT" when building a Go project

A pretty dumb conclusion (mostly on my part) but my issue came from having done go mod init in each of the folders. after removing go.mod and go.dep from each of the folders I did go mod init in, I could build without issue (through terminal)

Also, my packages in…

Oldest comments (0)