Can't push go app to heroku - build failed

Viewed 93

I have a go app that has the following go.mod file:

module toto

// +heroku goVersion go1.16
go 1.16

require (
    github.com/aws/aws-sdk-go v1.40.45
    github.com/golang-jwt/jwt v3.2.2+incompatible
    github.com/google/go-cmp v0.5.6 // indirect
    github.com/gorilla/mux v1.8.0
    github.com/joho/godotenv v1.3.0
    go.mongodb.org/mongo-driver v1.7.1
    golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
    golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect
    golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
    golang.org/x/text v0.3.7 // indirect
    golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
)

I'm trying to deploy it to Heroku and i get this message:

-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/go
-----> Go app detected
-----> Fetching stdlib.sh.v8... done
-----> 
       Detected go modules via go.mod
-----> 
       Detected Module Name: toto
-----> 
-----> Using go1.16.8
-----> Determining packages to install
 !     Push rejected, failed to compile Go app.
 !     Push failed

The logs don't help either:

2021-09-18T17:59:37.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/whatever

What am I missing ? The Procfile contains the right thing (web: bin/toto).

I have to mention that the build worked a couple of times before stopping to. I tracked the commit that caused it without spotting any major difference that could have caused this problem. I even tried to re-push the last accepted commit but it didn't even work either.

0 Answers
Related