1

I am a complete beginner at hosting applications right now but am trying to get a hold of it. - I have the MySQL database running locally on my PC. How to exactly should I host it somewhere online. - When I tried to deploy my Go server on Heroku, I got the following error and couldn't find a solution for it anywhere online.

-----> App not compatible with buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/go.tgz More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure ! Push failed

Any help in this regard would be appreciated!

Marc Delisle
  • 8,879
  • 3
  • 29
  • 29

2 Answers2

1

To fix this problem you need to use some of vendoring tools - e.g. Godep, dep etc. Heroku can't deploy golang app without 'vendor' folder

Bynov
  • 11
  • 1
0

just run this command:

go mod init [app-name]

this will create a go mod file and a go sum for you then run:

go get

to install those packages you called in your go app. developers usually use go mod init github.com/name/repo but go mod init [app-name] will do the job!

Fath
  • 84
  • 7