Commit 408e564
committed
fix(deploy): target Node 22 and the firebase-functions/v1 API in generated Cloud Functions
The generated function declared engines.node 14, a runtime Cloud
Functions decommissioned in early 2025, so it could not deploy at all.
The gen 1 template also called functions.region() on the
firebase-functions package root, which moved to the /v1 subpath in v6,
so a deployed function crashed at cold start with
TypeError: functions.region is not a function.
Node 22 is the newest runtime Cloud Functions supports and satisfies
the engines ranges of @angular/core and firebase-admin. Node 20 would
deploy today, but its security support ended 2026-04-30. The same
constant picks the Cloud Run base image, now node:22-slim. The docs
example moves off the decommissioned functionsNodeVersion 12.1 parent 279d891 commit 408e564
2 files changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
0 commit comments