Google App Engineの新機能です。そして、私は解決できない問題を抱えています。App EngineがGoライブラリでデプロイ
私はこのような(ゴーに開発さ)非常にシンプルなアプリをしました:私はそれを実行したときに
import (
"github.com/julienschmidt/httprouter"
"log"
"net/http"
)
私のコードがうまく機能:
main/
| model/
| | user.go
| main.go
| app.yaml
これらはmain.goの輸入ですローカルに。
しかし、私はGoogle App Engineのインスタンス上で、それを公開しようとすると、私はこのエラーが表示されます。
$ gcloud app deploy
You are about to deploy the following services:
- <MY_APP_ENGINE_URL> (from [<MY_LOCAL_YAML_PATH>])
Deploying to URL: [<MY_APP_ENGINE_URL>]
Do you want to continue (Y/n)? Y
Beginning deployment of service [default]...
Some files were skipped. Pass `--verbosity=info` to see which ones.
You may also view the gcloud log file, found at
[<LOCAL_APP_ENGINE_LOG>].
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Deployment contains files that cannot be compiled: Compile failed:
2017/05/27 14:48:24 go-app-builder: build timing: 5×compile (301ms total), 0×link (0s total)
2017/05/27 14:48:24 go-app-builder: failed running compile: exit status 2
main.go:4: can't find import: "github.com/julienschmidt/httprouter"
は私が間違って何をしたのですか?
EDIT: これは私のapp.yamlファイルの内容です:
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
あなたの答えをありがとう。 それは2つのフォルダGodepsとベンダー(私の依存関係の内容を含んでいます)を作成しました。しかし、私はまだApp Engineから同じエラーを受け取ります: main.go:4:インポートが見つかりません: "github.com/julienschmidt/httprouter" – Belgikoi
app.yamlにすべてを含めていますか? –
こんにちは、私は編集で私のapp.yamlの内容を追加しました:) @Ainの応答を読んで、それはGoDepsが私を助けることができないようです。本当ですか? – Belgikoi