anaconda icon indicating copy to clipboard operation
anaconda copied to clipboard

App Engine Deploy can't find import: "github.com/dustin/gojson"

Open kevflynn opened this issue 7 years ago • 3 comments
trafficstars

According to the docs, this is supports app engine deploys, but every single time I try to deploy with this package imported, I get this error:

ERROR: (gcloud.app.deploy) Error Response: [9] Deployment contains files that cannot be compiled: Compile failed:
/work_dir/github.com/ChimeraCoder/anaconda/vendor/github.com/dustin/go-jsonpointer/bytes.go:9: can't find import: "github.com/dustin/gojson"
/work_dir/github.com/ChimeraCoder/anaconda/backoff.go:6: can't find import: "github.com/azr/backoff"
2018/03/24 20:08:36 go-app-builder: build timing: 33×compile (23.42s total), 0×link (0s total)
2018/03/24 20:08:36 go-app-builder: failed running compile: exit status 2

it runs perfectly fine locally - only when i run gcloud app deploy, do i get this error

kevflynn avatar Mar 25 '18 03:03 kevflynn

I deployed to compute engine instead, but leaving this open if it's important to others to get working in app engine

kevflynn avatar Mar 27 '18 12:03 kevflynn

I'm not particularly familiar with AppEngine, but I'm not sure why it's not able to find the import. The GOPATH shouldn't matter, since the file is in fact vendored.

Searching for the error messages, all I see are issues like this: https://stackoverflow.com/questions/43744415/appengine-cant-find-import-google-golang-org-appengine. Which command were you using to deploy?

ChimeraCoder avatar Mar 29 '18 21:03 ChimeraCoder

I had the same problem. However, it was solved by using below goapp deploy command instead of gcloud app deploy.

$ goapp deploy --application ${app_id} --version ${version}

quiye avatar Jun 03 '18 10:06 quiye