briebug / jest-schematic

Angular schematic for adding Jest and the required files to an Angular CLI project
MIT License
319 stars 39 forks source link

ERESOLVE unable to resolve dependency tree with Angular 16.0.2 #151

Open melroy89 opened 1 year ago

melroy89 commented 1 year ago

Describe the bug

Issue with npm dependencies after executing ng add @briebug/jest-schematic. Yes, I could use the --legacy-peer-deps parameter, but that is a workaround. Please fix upstream.

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: erp.js@0.1.0
npm ERR! Found: @angular-devkit/build-angular@16.0.2
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR!   dev @angular-devkit/build-angular@"^16.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular-devkit/build-angular@"^15.0.0" from @angular-builders/jest@15.0.0
npm ERR! node_modules/@angular-builders/jest
npm ERR!   dev @angular-builders/jest@"15.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

To Reproduce Steps to reproduce the behavior:

  1. ng add @briebug/jest-schematic

Expected behavior

No errors.

Screenshots

image

Desktop (please complete the following information):

Angular CLI: 16.0.2
Node: 18.16.0
Package Manager: npm 9.5.1
OS: linux x64

Angular: 16.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1600.2
@angular-devkit/build-angular   16.0.2
@angular-devkit/core            16.0.2
@angular-devkit/schematics      16.0.2
@angular/cdk                    16.0.1
@angular/flex-layout            15.0.0-beta.42
@angular/material               16.0.1
@schematics/angular             16.0.2
rxjs                            7.8.1
typescript                      5.0.4

Additional context Add any other context about the problem here.

melroy89 commented 1 year ago

I guess that https://github.com/just-jeb/angular-builders needs to be updated again? or not??

Related: https://github.com/just-jeb/angular-builders/issues/1354 Related: https://github.com/just-jeb/angular-builders/issues/1355

melroy89 commented 1 year ago

I'm now using the next tag for the @angular-devkit/build-angular package. It seems to work.. But please, once @angular-devkit/build-angular for v16 is out, update your WoW as well.