我在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
正如本文档中所建议的,如果您的项目包含5个以上的函数,则建议使用--来提及特定的函数名称,以避免遇到部署配额限制。
示例:firebase deploy-only函数:addMessage,函数:makeUppercase