package XXX is not in GOROOT when building a Go project

You may have GO111MODULE set “on”, which will be on the go mod. Turning off the GO111MODULE may resolve this problem.
​​​go env -w GO111MODULE=off​​

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish