GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): drop the unused optional @angular/platform-server peer by armando-navarro · Pull Request #3792 · angular/angularfire

Conversation

@armando-navarro

@armando-navarro armando-navarro commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Refs #3667

Removes the optional @angular/platform-server peer from the published package, which no file in the package imports. On npm 10, and on npm 11 before 11.20, that peer alone makes installing AngularFire fail on an app whose Angular is one patch behind the newest.

Cause

  • npm 10 resolves a missing optional peer while it plans an install, instead of skipping it. It picks the newest @angular/platform-server matching AngularFire's range, which is 21.2.25 today.
  • Every @angular/platform-server release requires its own exact @angular/core version, so 21.2.25 asks for @angular/core 21.2.25.
  • In an app whose package.json says ^21.2.0 and which has 21.2.24 installed, @angular/common and the other Angular packages require @angular/core 21.2.24 exactly, so npm stops with Conflicting peer dependency: @angular/[email protected].
  • An app on the newest patch, or one that already installs @angular/platform-server, is not affected.
  • npm changed this in fix(arborist): don't fetch packuments for uninstallable optional peer deps npm/cli#9877, released in npm 12.1.0, and in its backport fix(arborist): don't fetch packuments for uninstallable optional peer deps npm/cli#9903, released in 11.20.0. The npm each current Node line bundles is still affected: 10.8.2 (Node 20), 10.9.9 (Node 22), 11.19.0 (Node 24) and 11.19.1 (Node 26).

Changes

  • src/package.json: drops @angular/platform-server from peerDependencies and peerDependenciesMeta. The root package.json keeps it as a dev dependency for the test runner.

Behavior to know

  • 21.0.0-rc.1 and 20.1.0 still declare this peer, so the fix reaches @next and @latest installs only with the next release on each line. A cherry-pick to 20.1.x follows this PR.
  • npm no longer warns when an app pairs AngularFire with a @angular/platform-server from another major. That pairing still fails, because @angular/platform-server requires the app's exact @angular/core.

Verification

  • In a copy of an Angular 21.2.24 app with ^21.2.0 ranges, npm install --package-lock-only of the current canary fails with Conflicting peer dependency: @angular/[email protected] on npm 10.8.2, 10.9.8, 10.9.9, 11.0.0, 11.19.0, 11.19.1 and 12.0.2, and installs on 11.20.0, 11.21.0, 12.1.0 and 12.2.0.
  • The same install of the package built from this branch succeeds on npm 10.8.2, 10.9.8, 10.9.9 and 11.19.1, with @angular/core left at 21.2.24.
  • @angular/[email protected] fails the same way on an Angular 20.3.32 app on npm 10.9.9, and installs once the peer is removed.
  • An app that already installs @angular/platform-server 21.2.24 installs before and after this change.
  • No file in 21.0.0-rc.1, 20.1.0 or the package built from this branch imports @angular/platform-server. Only a docs page mentions it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@armando-navarro
fix(core): drop the unused optional @angular/platform-server peer
b4eb093
npm 10, and npm 11 before 11.20, resolve a missing optional peer anyway
while installing. For an app whose package.json uses caret ranges and
whose Angular is one patch behind the newest, npm picks the newest
@angular/platform-server, which requires that exact newest
@angular/core, and the install stops with ERESOLVE. Every current Node
line bundles one of those npm versions.

Nothing in the published package imports @angular/platform-server, so
the peer is removed. Apps that render on the server still install it
themselves, as they already do.
@armando-navarro
armando-navarro requested a review from tyler-reitz October 8, 2026 00:09
@armando-navarro armando-navarro mentioned this pull request Oct 8, 2026
docs: note the removed @angular/platform-server peer in the v21 upgrade guide #3795
Merged
@armando-navarro armando-navarro added backport: 20.1.x Cherry-pick onto the 20.1.x branch for a 20.1 patch release bump: patch Size of the change: a fix or docs change that reaches users comp: core FirebaseApp DI core (src/app). dependencies Pull requests that update a dependency file type: bug Defect: expected behavior doesn't happen. labels Oct 8, 2026
tyler-reitz
tyler-reitz approved these changes Oct 8, 2026
View reviewed changes

@tyler-reitz tyler-reitz left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Reproduced the failure and the fix rather than reading them.

On an Angular 21.2.24 app with ^21.2.0 ranges, npm 10.9.9 plus the published 21.0.0-rc.1 stops with the error you quote, chained through peerOptional @angular/platform-server@"^21.2.0" from @angular/fire. The same app installs with 21.0.0-rc.1 repacked minus those two lines, leaving @angular/core at 21.2.24, and installs with the unmodified package on npm 11.20.0.

One thing worth knowing if anyone re-runs this: a minimal app (core, common, compiler, platform-browser) does not reproduce it on any npm version. The exact pins @angular/build brings in are what force the conflict, so a repro without the CLI dev dependencies looks clean and isn't.

Confirmed separately that nothing in the published tarball imports @angular/platform-server. The only mention is a code sample in docs/universal/prerendering.md where the app imports it, which this does not affect since such an app installs it directly. Root package.json, tools/jasmine.ts and sample/package.json keep it, which is right since they are dev and test only.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@armando-navarro armando-navarro added this to the 21.0.0-rc.2 milestone Oct 8, 2026
@armando-navarro
Merge branch 'main' into a67-drop-platform-server-peer
2157ab6
@armando-navarro
armando-navarro merged commit bbce8f0 into angular:main Oct 9, 2026
24 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@armando-navarro armando-navarro mentioned this pull request Oct 9, 2026
Backport ten fixes to 20.1.x for 20.1.1 #3798
Merged
armando-navarro added a commit that referenced this pull request Oct 10, 2026
@armando-navarro
fix(core): drop the unused optional @angular/platform-server peer (#3792
9e369c7
)

npm 10, and npm 11 before 11.20, resolve a missing optional peer anyway
while installing. For an app whose package.json uses caret ranges and
whose Angular is one patch behind the newest, npm picks the newest
@angular/platform-server, which requires that exact newest
@angular/core, and the install stops with ERESOLVE. Every current Node
line bundles one of those npm versions.

Nothing in the published package imports @angular/platform-server, so
the peer is removed. Apps that render on the server still install it
themselves, as they already do.

(cherry picked from commit bbce8f0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tyler-reitz tyler-reitz tyler-reitz approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

backport: 20.1.x Cherry-pick onto the 20.1.x branch for a 20.1 patch release bump: patch Size of the change: a fix or docs change that reaches users comp: core FirebaseApp DI core (src/app). dependencies Pull requests that update a dependency file type: bug Defect: expected behavior doesn't happen.

Projects

None yet

Milestone

21.0.0-rc.2

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@armando-navarro @tyler-reitz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.