Closed victorshinya closed 4 years ago
@victorshinya did you try building go build .
. There seems to be some confusion on the path as it seems to be looking into vendor directory.
I ran go install -tags cloudfoundry -buildmode pie .
locally and it worked. In this case, when you deploy an application using public Cloud Foundry on IBM Cloud, you don't need to build the app before you deploy (like Java). it should build and start automatically.
I am closing the issue since I figured out that I need to deploy the vendor/
folder to the IBM Cloud so Cloud Foundry can use all vendor package to build the app. Probably it will be solved in another Cloud Foundry's Go buildpack.
I built a new application in Golang, using Go Modules, and I've been trying to deploy to IBM Cloud but I've faced the same issue (logs below). I am not sure if this is something I did or something I built wrongly but since this is happening to me in a couple of other accounts (same application in other IBM Cloud accounts), maybe there are other developers who are facing the same stuff.
Service -> (Public) Cloud Foundry, Golang buildpack. App -> https://github.com/victorshinya/natural-language-understanding-demo
ERROR ->
build github.com/victorshinya/natural-language-understanding-demo: cannot load github.com/IBM/go-sdk-core/core: open /tmp/app/vendor/github.com/IBM/go-sdk-core/core: no such file or directory
go.mod
Logs