google-cloud-platform - Google Firebase Functions 部署失败 - 我该怎么办?
问题描述
错误信息:
Error: There was an error deploying functions
firebease-debug.log 包含以下内容:
[debug] [2021-11-16T12:12:16.165Z] Error: Failed to upsert schedule function lab2 in region europe-west3
功能代码:
exports.lab2 =
functions
.region('europe-west3')
.pubsub.schedule('*/10 * * * *')
.onRun(lab);
我能做些什么?谷歌支持导致stackoverflow,所以我把它贴在这里。有没有更好的方法来处理 Google Cloud 问题?
解决方案
当您在 Firebase Functions 中使用计划函数时,会创建一个 App Engine 实例,该实例是 Cloud Scheduler 工作所必需的。你可以在这里阅读。在设置过程中,系统会提示您选择项目的默认 Google Cloud Platform (GCP) 资源位置(如果在设置其他服务时尚未选择它)。
您收到该错误是因为您指定的默认 GCP 资源位置与您计划的 Cloud Function 的区域之间存在差异。如果您单击 Firebase 中项目概述旁边的齿轮,您可以看到您的资源所在的位置。将默认 GCP 资源位置设置为与调度程序功能区域相同,即可解决此问题。
推荐阅读
- mysql - 如何在mysql中显示分组?
- ios - 如何在 UITableViewCell 中使用 UICollectionView 显示场地列表的图像?
- java - javax.ws.rs.Produces 在 Spring 中等效
- python - 按一列分组,但将另外两列相加并计算第三列
- java - 为什么这段代码会导致 StackOverflow 错误:
- oracle - how to set focus on textbox in oracle form?
- javascript - 在圆柱几何体上创建凹口/雕刻
- javascript - Uglify.JS minifies filename instead of file contents
- xml - 使用 IXMLDOMDocument 和 XPath 解析 Dynamics 365 XML 数据
- ios - 如何根据我的要求自定义表格视图标题?