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
- Create a new Angular 20 app:
npx @angular/cli@20 new ng20 --skip-git
cd ng20
- 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
Bug Description
Installing
@angular-builders/jest@20in a fresh Angular 20 workspace fails with anERESOLVEdependency conflict. The root cause is that@angular-builders/jeststill 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/commonpeer range, which conflicts with the^20.3.0range resolved for the rest of a fresh Angular 20 workspace.Minimal Reproduction
npx @angular/cli@20 new ng20 --skip-git cd ng20Error
Expected Behavior
npm installshould succeed without needing--forceor--legacy-peer-deps.Environment