[英]Error trying to deploy Node.js project to Google app engine
我正在嘗試將node.js項目部署到我的App Engine項目中。 我使用的命令是gcloud preview app deploy app.yaml
。
這是我的app.yaml文件:
runtime: nodejs
vm: true
skip_files:
- ^(.*/)?.*/node_modules/.*$
這是我得到的錯誤: ERROR: (gcloud.preview.app.deploy) We were unable to detect the runtime to use for this application. Please specify the [runtime] field in your application yaml file or check that your application is configured correctly.
ERROR: (gcloud.preview.app.deploy) We were unable to detect the runtime to use for this application. Please specify the [runtime] field in your application yaml file or check that your application is configured correctly.
我很確定自己已經正確設置了項目,並且還使用gcloud init
我的gcloud CLI。
任何幫助將不勝感激!
編輯:
$ gcloud --version
Google Cloud SDK 99.0.0
bq 2.0.18
bq-nix 2.0.18
core 2016.02.26
core-nix 2016.02.05
gcloud
gsutil 4.17
gsutil-nix 4.15
$ gcloud components list
Your current Cloud SDK version is: 99.0.0
The latest available version is: 99.0.0
┌─────────────────────────────────────────────────────────────────────────────────┐
│ Components │
├───────────────┬─────────────────────────────────┬───────────────────┬───────────┤
│ Status │ Name │ ID │ Size │
├───────────────┼─────────────────────────────────┼───────────────────┼───────────┤
│ Not Installed │ Cloud Datastore Emulator │ gcd-emulator │ 38.1 MiB │
│ Not Installed │ Cloud Pub/Sub Emulator │ pubsub-emulator │ 10.1 MiB │
│ Not Installed │ gcloud Alpha Commands │ alpha │ < 1 MiB │
│ Not Installed │ gcloud Beta Commands │ beta │ < 1 MiB │
│ Not Installed │ gcloud app Java Extensions │ app-engine-java │ 101.4 MiB │
│ Not Installed │ gcloud app Python Extensions │ app-engine-python │ 7.2 MiB │
│ Not Installed │ kubectl │ kubectl │ 5.2 MiB │
│ Installed │ BigQuery Command Line Tool │ bq │ < 1 MiB │
│ Installed │ Cloud SDK Core Libraries │ core │ 3.9 MiB │
│ Installed │ Cloud Storage Command Line Tool │ gsutil │ 2.6 MiB │
│ Installed │ Default set of gcloud commands │ gcloud │ │
└───────────────┴─────────────────────────────────┴───────────────────┴───────────┘
嘗試在您的“ gcloud預覽應用程序部署”命令中添加--verbosity = debug,以查看發生了什么。 最有可能的是,gcloud無法識別您的應用程序中的其他內容,例如缺少或無效的package.json。 嚴重將其報告為無法識別的運行時。
要被識別為node.js應用程序,您必須具有server.js文件或具有package.json文件的package.json文件,該文件的“ scripts”部分指定“ start”命令。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.