ChimeraCoder / anaconda

A Go client library for the Twitter 1.1 API
MIT License
1.14k stars 247 forks source link

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

Open kevflynn opened 6 years ago

kevflynn commented 6 years ago

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 commented 6 years ago

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

ChimeraCoder commented 6 years ago

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?

quiye commented 6 years ago

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}