我有一个 Express JS 应用程序,我正在尝试将其部署到 GCP 应用程序引擎。我尝试使用
gcloud app deploy
从命令行部署它,但收到此错误消息:
You are creating an app for project [fake-bank-432202].
WARNING: Creating an App Engine application for a project is irreversible and the
region cannot be changed. More information about regions is at
<https://cloud.google.com/appengine/docs/locations>.
Please choose the region where you want your App Engine application located:
[1] asia-east1 (supports standard and flexible)
[2] asia-east2 (supports standard and flexible and search_api)
[3] asia-northeast1 (supports standard and flexible and search_api)
[4] asia-northeast2 (supports standard and flexible and search_api)
[5] asia-northeast3 (supports standard and flexible and search_api)
[6] asia-south1 (supports standard and flexible and search_api)
[7] asia-southeast1 (supports standard and flexible)
[8] asia-southeast2 (supports standard and flexible and search_api)
[9] australia-southeast1 (supports standard and flexible and search_api)
[10] europe-central2 (supports standard and flexible)
[11] europe-west (supports standard and flexible and search_api)
[12] europe-west2 (supports standard and flexible and search_api)
[13] europe-west3 (supports standard and flexible and search_api)
[14] europe-west6 (supports standard and flexible and search_api)
[15] northamerica-northeast1 (supports standard and flexible and search_api)
[16] southamerica-east1 (supports standard and flexible and search_api)
[17] us-central (supports standard and flexible and search_api)
[18] us-east1 (supports standard and flexible and search_api)
[19] us-east4 (supports standard and flexible and search_api)
[20] us-west1 (supports standard and flexible)
[21] us-west2 (supports standard and flexible and search_api)
[22] us-west3 (supports standard and flexible and search_api)
[23] us-west4 (supports standard and flexible and search_api)
[24] cancel
Please enter your numeric choice: 18
ERROR: (gcloud.app.deploy) The project [fake-bank-432202] already contains an App
Engine application. You can deploy your application using `gcloud app deploy`.
但是,当我尝试在同一个项目上运行
gcloud app describe
时,我收到此错误消息:
ERROR: (gcloud.app.describe) The current Google Cloud project [fake-bank-432202] does
not contain an App Engine application. Use `gcloud app create` to initialize an App
Engine application within the project.
我也尝试运行
gcloud app create
,但我得到了与运行时相同的错误gcloud app deploy
我尝试切换到不同的 GCP 项目,但仍然遇到相同的错误。
我能做些什么来解决这个问题吗?
这是我的 app.yaml 文件,如果有帮助的话:
runtime: nodejs22
skip_files:
- ^(.*/)?\.gitignore$
- ^(.*/)?\.git/