Title: fix(core): drop vestigial @angular/platform-browser-dynamic peer by armando-navarro · Pull Request #3718 · angular/angularfire · GitHub
Open Graph Title: fix(core): drop vestigial @angular/platform-browser-dynamic peer by armando-navarro · Pull Request #3718 · angular/angularfire
X Title: fix(core): drop vestigial @angular/platform-browser-dynamic peer by armando-navarro · Pull Request #3718 · angular/angularfire
Description: ng add @angular/fire fails with npm error ERESOLVE on Angular >= 20.1 apps (#3667). Cause @angular/fire declares a required peer on @angular/platform-browser-dynamic (^20.0.0 on the v20 line, ^21.0.0 on main). Every platform-browser-dynamic patch release requires the exact @angular/core and @angular/common version matching its own patch (for example, platform-browser-dynamic@20.1.7 declares @angular/core@20.1.7). To satisfy that wide peer range, npm picks some platform-browser-dynamic patch, and that patch in turn requires the exact @angular/core and @angular/common version matching itself (per point 2). That required version usually differs from the core/common the app already has installed, so npm cannot satisfy both at once and the install aborts with ERESOLVE. The reporter's tree pulled in platform-browser-dynamic@20.1.7, which demanded core@20.1.7 while their app had core@20.1.6; a pristine Angular 20 app hits the same conflict through 20.0.7. Why removing the peer is safe Nothing in the published package imports platform-browser-dynamic. The unpacked @angular/fire@20.0.1 and @21.0.0-rc.0 tarballs contain zero references outside the peer declaration itself (checked fesm2022/*.mjs, all .d.ts, and schematics/). The repository's only usage is the Karma test bootstrap (src/test.ts), which is supplied by the repository's root package.json and is unaffected. Apps that still bootstrap with platformBrowserDynamic() get the package from their own dependencies, never from this peer. Angular deprecated platform-browser-dynamic as of 20.1; the peer currently forces a deprecated package into every consumer install. Alternative considered: marking the peer optional in peerDependenciesMeta (the pattern this manifest already uses for firebase-tools and @angular/platform-server). That would also avoid the ERESOLVE on npm, but it keeps advertising a dependency relationship that does not exist, and the fix would then depend on npm-specific resolver behavior. Removal fixes every package manager. There is precedent for removing unneeded peers outright (#2095). Verification: built the package from this branch and installed the packed tarball into a fresh Angular 21 app: the install succeeds with no ERESOLVE, and platform-browser-dynamic is absent from the dependency tree. A control install of the currently published package into the same app pulls in the deprecated platform-browser-dynamic@21.2.18. Angular 20 users get this fix through the planned 20.0.2 patch release, which cherry-picks this commit together with the already-merged config generation fix (#3707). Refs #3667 (left open deliberately: the reporters there are on the v20 line, so the issue will be closed manually once 20.0.2 ships this fix to npm latest).
Open Graph Description: ng add @angular/fire fails with npm error ERESOLVE on Angular >= 20.1 apps (#3667). Cause @angular/fire declares a required peer on @angular/platform-browser-dynamic (^20.0.0 on the v20 line, ^...
X Description: ng add @angular/fire fails with npm error ERESOLVE on Angular >= 20.1 apps (#3667). Cause @angular/fire declares a required peer on @angular/platform-browser-dynamic (^20.0.0 on the v20 lin...
Opengraph URL: https://github.com/angular/angularfire/pull/3718
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d6f3a6ef-fd8c-c02b-56c8-adc0ffdcf275 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BB32:3CD7D9:1BCC4DD:247CB22:6A5C8680 |
| html-safe-nonce | a8390fa24dcdb6d90f34c977cabb0352d33d23b6d5893c44ac38904c2ef06d02 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjMyOjNDRDdEOToxQkNDNEREOjI0N0NCMjI6NkE1Qzg2ODAiLCJ2aXNpdG9yX2lkIjoiNjU4NzA4NDMwNDQ4NDY5NzcyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5d7b1029bd60823f66c668e0baf62045bb951d23e0633e86ca6ab9fd294b481b |
| hovercard-subject-tag | pull_request:4081579392 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/angular/angularfire/pull/3718/files |
| twitter:image | https://avatars.githubusercontent.com/u/13904589?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/13904589?s=400&v=4 |
| og:image:alt | ng add @angular/fire fails with npm error ERESOLVE on Angular >= 20.1 apps (#3667). Cause @angular/fire declares a required peer on @angular/platform-browser-dynamic (^20.0.0 on the v20 line, ^... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width