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…

Top comments (0)

Stop sifting through your feed.

Find the content you want to see.

Change your feed algorithm by adjusting your experience level and give weights to the tags you follow.