I am looking for your help on deploying cloud function Gen2 with next,js SSR framework.
Trying to deploy using firebase deploy command line, I have a valid pament method setup with Blaze plan. I have gen1 functions , trying to deploy gen2 function for Server Side rendering , blocked with this error. please advise.
I have attached firebase debug log for details.
[debug] [2023-04-14T14:39:35.552Z] Functions deploy failed.
[debug] [2023-04-14T14:39:35.553Z] {
"endpoint": {
"id": "ssrrelivecricket",
"project": "cricvideos-11184",
"region": "us-central1",
"entryPoint": "ssrrelivecricket",
"platform": "gcfv2",
"runtime": "nodejs18",
"httpsTrigger": {},
"labels": {
"deployment-tool": "cli-firebase"
},
"environmentVariables": {
"__FIREBASE_FRAMEWORKS_ENTRY__": "next.js",
"FIREBASE_CONFIG": "{\"projectId\":\"cricvideos-11184\",\"databaseURL\":\"
https://cricvideos-11184.firebaseio.com\",\"storageBucket\":\"
cricvideos-11184.appspot.com\",\"locationId\":\"us-central\"}",
"GCLOUD_PROJECT": "cricvideos-11184",
"EVENTARC_CLOUD_EVENT_SOURCE": "projects/cricvideos-11184/locations/us-central1/services/ssrrelivecricket"
},
"codebase": "firebase-frameworks-relivecricket",
"cpu": 1,
"concurrency": 80,
"targetedByOnly": true,
"hash": "fabcde982b63a413f465705d073c8bce5567f4d6"
},
"op": "create",
"original": {
"name": "FirebaseError",
"children": [],
"context": {
"function": "projects/cricvideos-11184/locations/us-central1/functions/ssrrelivecricket"
},
"exit": 1,
"message": "Failed to create function projects/cricvideos-11184/locations/us-central1/functions/ssrrelivecricket",
"original": {
"name": "FirebaseError",
"children": [],
"context": {
"body": {
"error": {
"code": 400,
"message": "Could not create Cloud Run service ssrrelivecricket. spec.template.spec.containers.resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 10.\nConsider running your workload in a region with greater capacity, decreasing your requested cpu-per-instance, or requesting an increase in quota for this region if you are seeing sustained usage near this limit, see
https://cloud.google.com/run/quotas. Your project may gain access to further scaling by adding billing information to your account.",
"status": "INVALID_ARGUMENT"
}
},
"response": {
"statusCode": 400
}
},
"exit": 1,
"message": "HTTP Error: 400, Could not create Cloud Run service ssrrelivecricket. spec.template.spec.containers.resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 10.\nConsider running your workload in a region with greater capacity, decreasing your requested cpu-per-instance, or requesting an increase in quota for this region if you are seeing sustained usage near this limit, see
https://cloud.google.com/run/quotas. Your project may gain access to further scaling by adding billing information to your account.",
"status": 400
},
"status": 400
}
}
[debug] [2023-04-14T14:39:35.668Z] Error: Failed to create function ssrrelivecricket in region us-central1
at /usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:48:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Fabricator.createV2Function (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:271:32)
at async Fabricator.createEndpoint (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:132:13)
at async handle (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:85:17)
[error]
[error] Error: There was an error deploying functions