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

[Bug]: npm install fails with latest jest 29.0.3 #1774

Closed
qwertyuiopzxcvbnmlkjhgfdsa1 opened this issue Sep 15, 2022 · 35 comments
Closed

[Bug]: npm install fails with latest jest 29.0.3 #1774

qwertyuiopzxcvbnmlkjhgfdsa1 opened this issue Sep 15, 2022 · 35 comments
Labels
🐛 Bug Confirmed Bug is confirmed

Comments

@qwertyuiopzxcvbnmlkjhgfdsa1

Version

2.2.2

Steps to reproduce

1,Use jest 29.0.3 as dependency with latest jest-preset-angular 2.2.2
2, npm install fails ERESOLVE unable to resolve dependency tree

Expected behavior

npm install works

Actual behavior

npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: xxx@3.0.1
npm ERR! Found: jest@29.0.3
npm ERR! node_modules/jest
npm ERR! dev jest@"29.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jest@"^28.0.0" from jest-preset-angular@12.2.2
npm ERR! node_modules/jest-preset-angular
npm ERR! dev jest-preset-angular@"12.2.2" 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.

Additional context

Would you release jest-angular-preset with jest 29 supported?

Environment

System:
    OS: Linux 5.18 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
  Binaries:
    Node: 16.17.0 - /usr/bin/node
    npm: 8.15.0 - /usr/bin/npm
@ahnpnl
Copy link
Collaborator

ahnpnl commented Sep 15, 2022

We haven’t finished supporting Jest 29 yet so ye this will have to wait for a major release.

@bendehghan
Copy link

bendehghan commented Sep 16, 2022

Any updates/guesses on when 29 will be supported? Thank you :)

@bendehghan
Copy link

Anything yet? It's been 2 weeks. Can you give an estimate please? At least we can plan things better on our end. Thanks

@qwertyuiopzxcvbnmlkjhgfdsa1
Copy link
Author

We downgraded Jest to version 28 and managed to get project working.

@bendehghan
Copy link

Well, yeah, my project already works fine with Jest 28. We just wanted to keep up with Jest as it moves forward. I guess we'll wait until this is issue resolved and 29 is supported.

@minijus
Copy link

minijus commented Oct 14, 2022

Are there any plans to cut new release any time soon? It seems new version of Jest was merged to main branch and it passed CI just fine: #1804

There is a chain of changes that increases the importance of having jest-preset-angular with Jest 29 support:

  1. There is outstanding Jest and Node.js 16.10+ issue with memory consumption: [Bug]: Memory consumption issues on Node JS 16.11.0+ jestjs/jest#11956
  2. Jest 29 added a workaround with new option workerIdleMemoryLimit
  3. Angular 15 drops support for Node.js 16.10 feat(@angular/cli): add support for Node.js version 18 angular/angular-cli#24026 putting Jest users in a limbo state.
  4. Nrwl seems to wait for jest-preset-angular release to add official support for Jest 29 to nx: Support Jest version 29.x.x nrwl/nx#11892

@bendehghan
Copy link

Hey guys,
how are we looking on this?? Can we expect this before Angular 15 gets out?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Oct 27, 2022

It will be together with angular 15 support in a major version:)

@kubabuda
Copy link

  • Do you have release date planned?
  • How can one help with that?

@bendehghan
Copy link

bendehghan commented Nov 2, 2022

It will be together with angular 15 support in a major version:)

Do you have a working branch we can test with current RC version of Angular 15?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Nov 2, 2022

You can test against main.

The leftover work now includes:

  • Adopt changes from ts-jest 29
  • Migrate any config under globals to be transformer config, just like ts-jest
  • Test with angular 15

@christrude
Copy link

Whats interesting about this error: npm ERR! peer jest@"^28.0.0" from jest-preset-angular@12.2.2 is that in 12.2.2 the package.json file already points to "jest": "^29.1.2", and "ts-jest": "^29.0.0". 28 isn't stated anywhere, and my corollary upgrades are being held back by this. I consider this a bug with 12.2.2. https://github.com/thymikee/jest-preset-angular/blob/main/package.json Agree/disagree?

@michaelfaith
Copy link
Contributor

@christrude you're not looking at the state of the file when the 12.2.2 tag was applied (i.e. when the release was made). https://github.com/thymikee/jest-preset-angular/blob/v12.2.2/package.json It's only on jest 28

@christrude
Copy link

@christrude you're not looking at the state of the file when the 12.2.2 tag was applied (i.e. when the release was made). https://github.com/thymikee/jest-preset-angular/blob/v12.2.2/package.json It's only on jest 28

you are right, i am a dumb dumb.

@joshwiens
Copy link

You can test against main.

The leftover work now includes:

  • Adopt changes from ts-jest 29
  • Migrate any config under globals to be transformer config, just like ts-jest
  • Test with angular 15

I'd like to pose a question. Would it not make more sense to push a tag that supports Angular 15 and then deal with all of the breaking updates for Jest v29.

At the moment anyone that updates via Nx to migrate to Angular 15 ( or without ) is getting blocked by what is effectively a single line package.json change related to peer dependencies.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Nov 28, 2022

12.2.3 supports Angular 15:)

@joshwiens
Copy link

Releasing on a holiday like a complete boss :)

@wmarques
Copy link

Any help needed on this ? :) Never contributed to this project but I'm willing to help if necessary, but I dont find what's left to do, sorry ! 😄

@DerHerrGammler
Copy link

Any updates on this?

@bendehghan
Copy link

Happy new year! Hope we can get back to solving this issue. It's holding up any real angular 15 release on our side.

@bendehghan
Copy link

@ahnpnl, @thymikee, Can you please update us on what is remaining here and what help you need? Is there a dependency issue on other packages or is the work only in this package? We can try to help. But how and on what??
Thanks, Ben

@michaelfaith
Copy link
Contributor

It's holding up any real angular 15 release on our side.

Why, if 12.2.3 supports Angular 15?

@bendehghan
Copy link

bendehghan commented Jan 4, 2023

Yes, sorry, I mean angular with Jest 29. Jest 28 + angular 15 is working. We usually release with latest jest, or try to at lease.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jan 4, 2023

You can test against main.

The leftover work now includes:

  • Adopt changes from ts-jest 29
  • Migrate any config under globals to be transformer config, just like ts-jest

@bendehghan

@bendehghan
Copy link

Are these things the community can help with? Is it a block like there is no solution you can see or that there isn't time to make the changes? It's been taking a long time so I wanted to see what we can help with.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jan 4, 2023

Yes feel free to tackle these.

@beeman
Copy link
Contributor

beeman commented Jan 5, 2023

Might be worth asking Nrwl to take over maintenance. It's a pretty sad state of things that we massively have to hold back this Jest upgrade because of one dependency that's not maintained. Even more so in workspaces that don't use Angular.

@michaelfaith
Copy link
Contributor

You could always pitch in and help out... Complaining like that, just to complain, isn't helpful. ahnpnl's done an amazing job maintaining this project. They're very responsive and jumps on stuff quickly, when needed. We're just on the other side of a long holiday; why not give them the space to make the change, or pitch in and help out yourself. This is open source after all.

@beeman
Copy link
Contributor

beeman commented Jan 5, 2023

You could always pitch in and help out... Complaining like that, just to complain, isn't helpful.

People offered to help for months with no result. I'm trying to come up with a real solution instead of your utopian scenario.

Already talking to Nrwl as we speak.

@Tommy228
Copy link

Tommy228 commented Jan 7, 2023

What changes from ts-jest 29 need to be adopted? I don't see anything from the changelog, except the migration from a global config to a transformer config.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jan 7, 2023

That’s the only change which produces warning logs when running tests in main. Internally we patch globals object to pass to ts-jest

@Tommy228 Tommy228 mentioned this issue Jan 7, 2023
5 tasks
@ahnpnl
Copy link
Collaborator

ahnpnl commented Jan 27, 2023

closes via #1901 #1937

Please test with 13.0.0-next.1

@barbados-clemens
Copy link

Hi @ahnpnl I've been testing the v13.0.0-next.1 package on a handful of Nx repos without any issues. Was wondering if there is an ETA on a stable release for jest-preset-angular v13.
Thanks!

@ahnpnl
Copy link
Collaborator

ahnpnl commented Feb 17, 2023

Hi, I’m glad to hear that. I will arrange asap.

@ahnpnl ahnpnl unpinned this issue Feb 19, 2023
@ghiscoding
Copy link

You can test against main.

The leftover work now includes:

  • Adopt changes from ts-jest 29
  • Migrate any config under globals to be transformer config, just like ts-jest
  • Test with angular 15

Note that the documentation to migrate ts-jest config from globals to transform is not reflected in the Documentation and it took me a few trials and errors to get it working. It might be a good idea to reflect the changes in the docs. Thanks for the lib :)

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

No branches or pull requests