Skip to content

ERESOLVE: @angular-builders/jest@20 depends on deprecated @angular/platform-browser-dynamic peer #2387

Open

Description

@akaustav

Bug Description

Installing @angular-builders/jest@20 in a fresh Angular 20 workspace fails with an ERESOLVE dependency conflict. The root cause is that @angular-builders/jest still declares a peer dependency on @angular/platform-browser-dynamic, which was deprecated by the Angular team as part of the Angular 19 → 20 migration (its functionality was folded into @angular/platform-browser). The deprecated package is pinned to an older @angular/common peer range, which conflicts with the ^20.3.0 range resolved for the rest of a fresh Angular 20 workspace.

Minimal Reproduction

  1. Create a new Angular 20 app:
    npx @angular/cli@20 new ng20 --skip-git
    cd ng20
  2. Install the package:
    npm i -D @angular-builders/jest@20

Error

npm i -D @angular-builders/jest@20
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: ng20@0.0.0
npm error Found: @angular/common@20.3.27
npm error node_modules/@angular/common
npm error   @angular/common@"^20.3.0" from the root project
npm error   peer @angular/common@"20.3.27" from @angular/platform-browser@20.3.27
npm error   node_modules/@angular/platform-browser
npm error     @angular/platform-browser@"^20.3.0" from the root project
npm error     peerOptional @angular/platform-browser@"^20.0.0" from @angular-devkit/build-angular@20.3.33
npm error     node_modules/@angular-devkit/build-angular
npm error       peer @angular-devkit/build-angular@"^20.0.0" from @angular-builders/jest@20.0.0
npm error       node_modules/@angular-builders/jest
npm error         dev @angular-builders/jest@"20" from the root project
npm error     2 more (@angular/platform-server, @angular/router)
npm error   3 more (@angular/platform-server, @angular/ssr, @angular/router)
npm error
npm error Could not resolve dependency:
npm error peer @angular/common@"20.0.7" from @angular/platform-browser-dynamic@20.0.7
npm error node_modules/@angular/platform-browser-dynamic
npm error   peer @angular/platform-browser-dynamic@"^20.0.0" from @angular-builders/jest@20.0.0
npm error   node_modules/@angular-builders/jest
npm error     dev @angular-builders/jest@"20" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.

Expected Behavior

npm install should succeed without needing --force or --legacy-peer-deps.

Environment

Libs
- @angular/core: 20.3.27
- @angular/cli: 20.3.33
- @angular-devkit/build-angular: N/A - using the esbuild and Vite-based `@angular/build@20.3.27` package instead
- @angular-builders/jest: 20.0.0

Tooling
- Node.js: v24.16.0
- npm: 11.13.0
- OS: Windows

Activity

  1. akaustav commented on Aug 12, 2026

    @akaustav
    Author

    Root Cause

    @angular/platform-browser-dynamic was deprecated by the Angular team in the Angular 19 → 20 release. @angular-builders/jest@20.0.0 still declares a peer dependency on @angular/platform-browser-dynamic@^20.0.0, which resolves to @angular/platform-browser-dynamic@20.0.7, pinned to @angular/common@20.0.7 — conflicting with the ^20.3.0 range resolved elsewhere in a fresh Angular 20 workspace.

    Suggested Fix

    Remove (or relax/make optional) the peer dependency on the deprecated @angular/platform-browser-dynamic package in @angular-builders/jest, since it is no longer required for Angular 20 projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions