mns*_*eme 5 google-app-engine firebase google-cloud-functions
我正在尝试从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 https://console.cloud.google.com/appengine and try again. If this issue persists, please contact support.
Error: HTTP Error: 500, Internal error encountered.
在没有设置Google App Engine之前,我的云功能就可以正常工作,而且我似乎在文档中找不到任何提及需要Google App Engine的信息。
小智 5
尝试将 firebase-tools 更新到最新版本。这为我解决了这个问题。
npm install -g firebase-tools
Run Code Online (Sandbox Code Playgroud)
对我来说,这是云资源位置的问题。
因此,只需将 firestore 添加到您的项目中并选择一个位置(即欧洲西部)。
解释:
firebase init我收到错误后:
错误:未为此项目设置云资源位置,但您尝试在 Cloud Firestore 中执行的操作需要该位置。请参阅此文档了解更多详细信息: https ://firebase.google.com/docs/projects/locations
因此,请访问https://console.firebase.google.com/project,选择您的项目,然后单击数据库并添加 firestore(如果您愿意,也可以添加实时数据库)。这也将允许您的函数被上传。
如果您的函数使用云数据存储,那么是的,您需要创建一个 App Engine 项目(实际上您不需要部署 GAE 应用程序)。来自App Engine 应用程序的依赖关系:
如果您使用 Google Cloud 库访问 Cloud Datastore,则您的 Cloud 项目需要活动的 App Engine 应用程序。打开 App Engine仪表板并确认您的 Cloud 项目具有活动的 App Engine 应用程序。如果需要,创建 App Engine 应用程序。该应用程序不得被禁用。
| 归档时间: |
|
| 查看次数: |
2333 次 |
| 最近记录: |