Gcloud components update -> can't find import

2019-08-01 09:38发布

问题:

Our code base has been compiling just fine up until now. Today, gcloud started pestering me with its update message again, so I ran a "gcloud components update" and it updated successfully.

However, now when I try to deploy our project using "gcloud preview app deploy .", I get the following error:

can't find import: "github.com/dgrijalva/jwt-go"

The line hasn't changed since it was properly deploying before the update. I've already tried a "go get -u github.com/dgrijalva/jwt-go", which worked (though I'm not sure if local packages affect the deployment anyway). Anyone know what's going on here?

回答1:

Apparently gcloud is in a state of transition for the go tools. It does work with appcfgy.py under the latest (Cloud SDK 0.9.57).

/path/to/your/google-cloud-sdk/bin/appcfg.py update --oauth2 <my_module>/app.yaml -A <application id> -V <version>