heroku-buildpack-go icon indicating copy to clipboard operation
heroku-buildpack-go copied to clipboard

Way to set GO111MODULE for 1.16?

Open joesiewert opened this issue 3 years ago • 0 comments

Our app is deploying successfully on 1.15, but gives the following error when deploying on 1.16. I'm pretty sure we need GO111MODULE=auto set, but it doesn't look like the buildpack looks for that right now? This app has not been migrated to modules yet and is currently using dep instead.

https://blog.golang.org/go116-module-changes

-----> New Go Version, clearing old cache
-----> Installing go1.16
-----> Fetching go1.16.linux-amd64.tar.gz... done
-----> Running: go install -v -tags heroku ./src/cmd/... 
go: cannot find main module, but found Gopkg.lock in /tmp/tmp.VT0EYkxNgQ/.go/src/github.com/my-org/my-repo
	to create a module there, run:
	go mod init
 !     Push rejected, failed to compile Go app.
 !     Push failed

joesiewert avatar Mar 05 '21 18:03 joesiewert