【问题标题】:Firebase Cloud Functions deploy errorFirebase Cloud Functions 部署错误
【发布时间】:2018-06-17 18:58:35
【问题描述】:

我正在尝试从 firebase CLI 部署我的项目,但我的功能存在问题。这很奇怪,因为四个星期前我没有遇到任何问题。我没有更改任何 Firebase 云功能设置。当我尝试运行
firebase deploy
firebase deploy --only functions

我得到同样的错误:
There was an issue deploying your functions. Verify that your project has a Google App Engine instance setup at @987654321@ and try again. If this issue persists, please contact support.

错误:HTTP 错误:500,遇到内部错误。


之前我的云功能运行良好,无需设置 Google App Engine,我似乎在文档中找不到任何提及需要 Google App Engine 的内容。

【问题讨论】:

标签: google-app-engine firebase google-cloud-functions


【解决方案1】:

如果您的函数使用 Cloud Datastore,您需要创建 Cloud Firestore 数据库。

转到Firebase dashboard -> Database 然后创建新数据库。

【讨论】:

    【解决方案2】:

    对我来说,这是云资源位置的问题。

    因此,只需将 firestore 添加到您的项目并选择一个位置(即欧洲西部)。

    解释:

    firebase init之后出现错误:

    错误:未为此项目设置云资源位置,但 您尝试在 Cloud Firestore 中执行的操作需要 它。有关更多详细信息,请参阅此文档: https://firebase.google.com/docs/projects/locations

    所以去https://console.firebase.google.com/project,选择你的项目,然后点击数据库并添加firestore(或者你喜欢的实时数据库)。这也将允许上传您的函数。

    【讨论】:

      【解决方案3】:

      如果您的系统遇到问题当天有服务中断,请查看 Google Cloud 状态信息中心。

      https://status.cloud.google.com/

      【讨论】:

      • Google Stackdriver 已停止。
      【解决方案4】:

      我做了以下解决了我的问题

      npm i -g firebase-tools

      访问了 URL https://console.cloud.google.com/appengine,因为它在响应中

      【讨论】:

        【解决方案5】:

        尝试将 firebase-tools 更新到最新版本。这为我解决了这个问题。

        npm install -g firebase-tools
        

        【讨论】:

          【解决方案6】:

          如果您的函数使用Cloud Datastore,那么是的,您需要创建一个 App Engine 项目(您实际上并不需要部署 GAE 应用程序)。来自Dependency on App Engine application

          如果您使用 Google Cloud 库访问 Cloud Datastore, 您的 Cloud 项目需要一个有效的 App Engine 应用程序。打开 App Engine dashboard 并确认您的 Cloud 项目已激活 App 引擎应用程序。如果需要,创建 App Engine 应用程序。该应用程序不得 被禁用。

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2019-04-11
            • 2021-09-27
            • 2018-05-25
            • 2022-08-19
            • 2020-05-10
            • 2017-09-01
            • 2018-08-18
            • 2017-10-09
            相关资源
            最近更新 更多