Commit a99f09b
authored
fix(schematics): use the exported logger/compat subpath in generated functions (#3730)
The SSR Cloud Function generated by `ng deploy` crashed at cold start:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath
'./lib/logger/compat' is not defined by "exports" in
node_modules/firebase-functions/package.json
Both generated templates required `firebase-functions/lib/logger/compat`.
firebase-functions declares an exports map, and the internal `lib/` path is not
in it. The exported subpath is `firebase-functions/logger/compat`, which maps
to the same file.
Verified by generating the function source and loading it against a real
firebase-functions install: the shipped path throws, the exported path loads
and emits structured Cloud Logging JSON, which is what the compat logger is
there to do.
This affects the deployed function rather than the build, so it fails at
runtime in Cloud Functions rather than during `ng deploy`, and it is present in
both the 20.x and 21.x lines.1 parent 6ef4767 commit a99f09b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
0 commit comments