【问题标题】:Build failed: Quota exceeded for quota metric after upgrade Node 14 to 16构建失败:将节点 14 升级到 16 后,配额指标超出配额
【发布时间】:2022-01-08 15:07:36
【问题描述】:

我在 package.json 中将 Node Engine 14 升级到 16。现在我无法一次部署所有云功能。

我运行此命令一次部署所有功能。

"deploy-dev": "firebase use dev && firebase deploy --only functions"

终端上的错误消息

Functions deploy had errors with the following functions:
        chatFieldDisableOnce(us-central1)
        chatFieldReqUpdateOnce(us-central1)
        contactYello(us-central1)
        createPayment(us-central1)
        makePayment(us-central1)
        paymentCapture(us-central1)
        reviewUpdateOnce(us-central1)
        sendPostPromotion(us-central1)
        vendorCountToSub(us-central1)

我查看日志。我发现了这个错误

{
"@type":"type.googleapis.com/google.cloud.audit.AuditLog",
"status": {
   "code":8,
   "message":"Build failed: Quota exceeded for quota metric 'Build Create requests' and limit 'Build Create requests per minute' of service 'cloudbuild.googleapis.com' for consumer 'project_number:number is here'."
},
"authenticationInfo":{"principalEmail":"xxx@gmail.com"},
"serviceName":"cloudfunctions.googleapis.com",
"methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction",
"resourceName":"projects/yellochat-12b69/locations/us-central1/functions/sendPostPromotion"
} 

我目前使用这个命令一一部署所有故障功能。这个工作正常。

firebase use dev && firebase deploy --only functions:function_name

【问题讨论】:

  • 你同时部署多少个函数?
  • 25 个函数。在 nodeJS 14 上运行时它运行没有任何问题。
  • 当您在 nodejs 14 中部署所有 25 个函数时,它可以工作,对吧?不在nodejs16中?奇怪....因为你有 Cloud Build 配额,限制了同时 Cloud Build 的数量,所以节点 14 或 16 的部署模式相同,并以类似的方式使用 Cloud Build。
  • @guillaumeblaquiere 现在我在使用节点 16 重新启动 lap 相同命令后再次尝试。现在它工作正常,没有任何问题。 npm run deploy-dev

标签: typescript firebase google-cloud-functions


【解决方案1】:

正如document 中所建议的那样,如果您的项目包含超过 5 个函数,那么建议使用 --only 提及特定函数名称以避免遇到部署配额限制。

示例:firebase deploy --only functions:addMessage,functions:makeUppercase

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-09-23
    • 2022-11-09
    • 1970-01-01
    • 2012-04-29
    • 1970-01-01
    相关资源
    最近更新 更多