5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

google cloud sdkを190.0.1にバージョンアップしたら `goapp cannot import name goroots` のエラーが発生した

Last updated at Posted at 2018-02-24

今日、 google cloud sdk190.0.1 にバージョンアップしたら、 goapp cannot import name goroots というエラーが出た。

再インストールしたりしても直らなかったため備忘録として。

原因

${GCLOUD_SDK_ROOT}/platform/google_appengine/google/appengine/tools から goroots.py というスクリプトが消えてた。

対応

過去のバージョンを参考に、下記のスクリプトを追加した。

${GCLOUD_SDK_ROOT}/platform/google_appengine/google/appengine/tools/goroots.py
GOROOTS = {
    'go1': 'goroot-1.8',
    'go1.6': 'goroot-1.6',
    'go1.8': 'goroot-1.8',
}

とりあえずこれで動く。

他にいい対応あるかもしれないし、もしかしたら僕の環境でしか発生しないかもしれないけど、誰か何か知ってたら教えてください。

追記 Google Cloud SDK の goapp コマンドについて

golang/appengine#124 (comment)より

goapp is not supported when run from the gcloud sdk. If you still must use it, please use the legacy SDK by going to https://cloud.google.com/appengine/docs/standard/go/download and clicking "Download and install the original App Engine SDK for Go."

このコメント見る感じ、なんか今後修正されなさそうな気配がするため、今後は goapp 使わない方がいい気がする。
goapp コマンド使えなくても対して困らない気はするけど、CIとかでテストとかデプロイにgoappコマンド使ってるケースもあると思うので、既存のプロダクトは気をつけた方がよさそう。

5
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?