gcpug / nouhau

Google Cloud Platformのノウハウを共有するRepository
https://gcpug.jp
MIT License
655 stars 23 forks source link

Google Cloud SDK 190.0.1 で goapp がImportErrorでコケる #29

Closed sinmetal closed 4 years ago

sinmetal commented 6 years ago

問題

goapp実行時にエラーが発生する

$ goapp

Traceback (most recent call last):
  File "/Users/sinmetal/bin/google-cloud-sdk/platform/google_appengine/goapp", line 40, in <module>
    from google.appengine.tools import goroots
ImportError: cannot import name goroots

解決策

google-cloud-sdk/platform/google_appengine/google/appengine/tools に自分で goroots.py を作成すれば解決できる。

GOROOTS = {'go1': 'goroot-1.8', 'go1.6': 'goroot-1.6'}

根本解決のための本体のissue

https://github.com/golang/appengine/issues/124

sinmetal commented 6 years ago

gcloud components app-engine-go を使うんじゃなくて、 https://cloud.google.com/appengine/docs/standard/go/download#previous-sdk から直接ダウンロードしてくださいと https://github.com/golang/appengine/issues/124 で言われてて、またお前 Google Cloud SDKから出ていくの?という気持ちになっている。