Angular 13, ng add @briebug/jest-schematic fails due to dependency conflict
Opened this issue · 5 comments
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
npm install -g @angular/cli@13
ng new -S --style=scss --strict --create-application=false -p=reprepo rep-repo
ng add @briebug/jest-schematic
Expected behavior
A clear and concise description of what you expected to happen.
Add the compatible @angular-builders/jest@^13.3.12 or similar version instead of the latest when using older angular versions.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [M1 macOS]
- Node version: [v16.15.0]
- App type [Angular CLI]
- Angular version [@angular/core: "13.3.12"]
Additional context
Maybe there's an opportunity for a feature request here? Maybe adding an optional argument to specify the version of angular-builder to install or to force the install.
Hello, I have the same issue with angular 14.2.12
@schuchard could you help us with it?
My initial thought is that the @angular-builders/jest
version is incompatible with your version of Angular and it's manifesting through @angular-devkit/build-angular
.
I've laid the groundwork for configuring this schematic's dependences with optional version numbers.
Couple options:
- quick fix: hardcode compatible versions in this schematic, though it would eventually need to be updated
- more work: create a CLI prompt to manually set package versions
hello! @Shestak2039 did you find a solution? I have the same issue and the same version
For Angular 14 (where the problem is also reproducible) I did it like this:
npm i -D @angular-builders/jest@^14 && npx ng add @briebug/jest-schematic@^5
I was having issues with the ng add @briebug/jest-schematic
command on my angular 15.2.7 application and the equivalent worked for me, ymmv
npm i -D @angular-builders/jest@^15 && npx ng add @briebug/jest-schematic@^6