Gloud app deploy failure "cannot use -o with multiple packages"

352 views
Skip to first unread message

br...@kaiserdigital.com

unread,
Oct 30, 2018, 3:28:56 PM10/30/18
to Google App Engine
I created a go web application and successfully deployed it using "gcloud app deploy". When I added a reference to "github.com/gorilla/mux", I was able to build and run it locally. When I deployed it using "gcloud app deploy", it failed with the following error message.



Services to deploy:

descriptor:      ********************************************
source:          ********************************************
target project:  ********************************************
target service:  [default]
target version:  [20181030t105409]
target url:      ********************************************


Do you want to continue (Y/n)?  y

Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 0 files to Google Cloud Storage                ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build ******************************************** status: FAILURE.
Build error details: go build: cannot use -o with multiple packages
.

Edgar (Google Cloud Platform Support)

unread,
Oct 30, 2018, 11:02:05 PM10/30/18
to Google App Engine

This issuetracker thread discuss the same issue as described here. The library used is the same as well and they have been able to resolve the issue. The issue is regarding the migration and difference  between the Go 11.9 runtime and the new Go 1.11 runtime for App Engine. Please read more below for more details.


- Verify which Go runtime version you are running and should it be Go 1.11, the issue could be resolved by:


Putting your application and related code in your GOPATH.

or

Creating a go.mod file to define your module.


You will find more in-depth information in this article regarding the runtime differences and steps details in order to do the above.



Please kindly note that this forum is meant for general discussion of the App Engine platform, not specific technical issues. If you believe that what you've encountered is platform specific issue you can report this by creating an issue in the Issue Tracker and Google Cloud Support team member will assist you to resolve your issue. If your issue is not a platform issue but rather a problem with how you've configured your code, although you're not sure what it may be specifically, you should post to StackOverflow and community of developers will assist you.

Reply all
Reply to author
Forward
0 new messages