Hello!
I have been searching high and low for an answer, but so far have not had much luck. I could not find a google cloud functions group, so I am posting here in general dev. If there is a better place to ask, please let me know.
I have a project I am migrating from AppEngine to Google Cloud Functions. Since I have some private repositories as dependencies, I must vendor instead of using go.mod.
However, when I attempt to deploy using gcloud functions deploy ReturnLicense --region=asia-east2 --runtime go111 --trigger-http --project "MYPROJECT"
it fails like so:
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: /tmp/sgb/gopath/src/serverlessapp/vendor/MYSOURCE.go:10:2: cannot find package "
github.com/MYUSER/MYDEP" in any of:
$ go env GOROOT
/usr/lib/go-1.11
$ go env GOPATH
/home/User/go
Since I am in a container, I even went so far as to symlink $GOPATH to /go, just to try to force the issue (I tear down the container and rebuild a couple times a day). Is this happening in the remote environment instead of locally? Why aren't any of my vendored sources included/found when I deploy?
Any help is greatly appreciated!