Title: `ng add` crashes with `ReferenceError: e is not defined` instead of warning when dataconnect.yaml cannot be parsed · Issue #3710 · angular/angularfire · GitHub
Open Graph Title: `ng add` crashes with `ReferenceError: e is not defined` instead of warning when dataconnect.yaml cannot be parsed · Issue #3710 · angular/angularfire
X Title: `ng add` crashes with `ReferenceError: e is not defined` instead of warning when dataconnect.yaml cannot be parsed · Issue #3710 · angular/angularfire
Description: Version info Angular: 21.2.x Firebase: 12.x AngularFire: 21.0.0-rc.0 How to reproduce these conditions A workspace whose firebase.json has a dataconnect.source entry, where the referenced dataconnect.yaml (or its connector's connector.ya...
Open Graph Description: Version info Angular: 21.2.x Firebase: 12.x AngularFire: 21.0.0-rc.0 How to reproduce these conditions A workspace whose firebase.json has a dataconnect.source entry, where the referenced dataconne...
X Description: Version info Angular: 21.2.x Firebase: 12.x AngularFire: 21.0.0-rc.0 How to reproduce these conditions A workspace whose firebase.json has a dataconnect.source entry, where the referenced dataconne...
Opengraph URL: https://github.com/angular/angularfire/issues/3710
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`ng add` crashes with `ReferenceError: e is not defined` instead of warning when dataconnect.yaml cannot be parsed","articleBody":"### Version info\n\n**Angular:** 21.2.x **Firebase:** 12.x **AngularFire:** 21.0.0-rc.0\n\n### How to reproduce these conditions\n\n1. A workspace whose `firebase.json` has a `dataconnect.source` entry, where the referenced `dataconnect.yaml` (or its connector's `connector.yaml`) is missing, unreadable, or malformed.\n2. Run `ng add @angular/fire` so the setup schematic calls `parseDataConnectConfig`.\n\n### Expected behavior\n\nThe parse failure is caught and logged (\"Couldn't parse dataconnect.yaml\" plus the underlying error), and setup continues with the Data Connect config treated as absent — which is what the catch handler is written to do.\n\n### Actual behavior\n\nThe catch handler names its error variable `_` but logs `e`, which is not defined (`src/schematics/utils.ts:379`):\n\n```ts\n} catch (_) {\n console.error(\"Couldn't parse dataconnect.yaml\", e);\n return null;\n}\n```\n\nEvaluating `e` throws `ReferenceError: e is not defined` from inside the catch, so the schematic crashes with an error that points nowhere near the actual problem (the YAML). Nothing typechecks this file today — the library build excludes the schematics and esbuild doesn't check types — which is how the undefined identifier survived. Introduced in #3638.\n","author":{"url":"https://github.com/armando-navarro","@type":"Person","name":"armando-navarro"},"datePublished":"2026-07-09T17:14:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3710/angularfire/issues/3710"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9909a041-db6a-dc5d-bf21-6794853709dd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C7D6:22AFD6:49B4C75:604A6CA:6A5D5677 |
| html-safe-nonce | b2c53ca20b300f401865e8da56d5c263e79a34d52d1cdfd75e1b1d94738fccf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0Q2OjIyQUZENjo0OUI0Qzc1OjYwNEE2Q0E6NkE1RDU2NzciLCJ2aXNpdG9yX2lkIjoiNzk4MzQzMTA0MzQ2MTc2NDcyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c9ff47e0aefe39145678e2d82c0c3a7821ff8270904281335aafbdea7f530d00 |
| hovercard-subject-tag | issue:4848374568 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/3710/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f70b77e6059429d50f8ec1f5ae1d437e3bad3792885b3ff4b56f8adffb356b2/angular/angularfire/issues/3710 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f70b77e6059429d50f8ec1f5ae1d437e3bad3792885b3ff4b56f8adffb356b2/angular/angularfire/issues/3710 |
| og:image:alt | Version info Angular: 21.2.x Firebase: 12.x AngularFire: 21.0.0-rc.0 How to reproduce these conditions A workspace whose firebase.json has a dataconnect.source entry, where the referenced dataconne... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | armando-navarro |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width