Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 13, ng add @briebug/jest-schematic fails due to dependency conflict #134

Open
poxopox opened this issue Dec 7, 2022 · 5 comments

Comments

@poxopox
Copy link

poxopox commented Dec 7, 2022

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. npm install -g @angular/cli@13
  2. ng new -S --style=scss --strict --create-application=false -p=reprepo rep-repo
  3. 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.
image

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.

@Shestak2039
Copy link

Shestak2039 commented Jan 16, 2023

Hello, I have the same issue with angular 14.2.12
image
@schuchard could you help us with it?

@schuchard
Copy link
Collaborator

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

@Franco-Oh
Copy link

hello! @Shestak2039 did you find a solution? I have the same issue and the same version

@rkrisztian
Copy link

rkrisztian commented Mar 24, 2023

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

@kylebradshaw
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants