У меня есть приложение 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/
🤔 А знаете ли вы, что...
ExpressJS поддерживает промежуточное ПО (middleware), что упрощает обработку запросов и ответов.
Как упоминалось в документе ,
Раньше все базы данных Firestore были связаны с приложением App Engine. При связывании вашей базе данных требуется активное приложение App Engine в том же проекте. Без активного приложения App Engine доступ для чтения и записи к базе данных отключен.
Несоответствие может возникнуть между регионом, в котором находится Datastore/Firestore
, и регионом, в котором App Engine
пытаются создать, когда клиент сначала создает Datastore
, а затем пытается создать App Engine
приложение в другом регионе.
И также упомянуто @NoCommandLine, это также может быть связано с выставлением счетов. Предлагаю вам проверить и включить биллинг .