从终端部署到 GCP App Engine 会产生矛盾的错误消息

问题描述 投票:0回答:1

我有一个 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/
express google-cloud-platform google-app-engine cloud
1个回答
0
投票

正如文档中提到的,

以前,所有 Firestore 数据库都链接到 App Engine 应用。链接后,您的数据库需要同一项目中存在活动的 App Engine 应用程序。如果没有活动的 App Engine 应用程序,则将禁用对数据库的读写访问。

当客户首次创建

Datastore/Firestore
,然后尝试在不同区域创建
App Engine
应用程序时,
Datastore
所在的区域与尝试创建
App Engine
的区域之间可能会发生不匹配。

@NoCommandLine 也提到,这也可能是由于计费造成的。我建议您检查并启用billing

© www.soinside.com 2019 - 2024. All rights reserved.