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

@types/testing-library__jest-dom ^5.9.1 has jest * in deps and it brokes yarn install #476

Closed
olegKusov opened this issue Sep 19, 2022 · 4 comments · Fixed by #511
Closed
Labels

Comments

@olegKusov
Copy link

olegKusov commented Sep 19, 2022

Please, set fixed version of @types/jest in deps of @types/testing-library__jest-dom because latest @types/jest 29 installs latest expect "^29.0.0". and "expect" package has node engine requirement that does not support node 12.18.1 and it broke our installation

@olegKusov olegKusov changed the title @types/testing-library__jest-dom ^5.9.1 @types/testing-library__jest-dom ^5.9.1 has jest * in deps and it brokes yarn install Sep 19, 2022
@olegKusov olegKusov reopened this Sep 19, 2022
@wagnerlduarte
Copy link

The same problem here! Did someone fix it?

@wagnerlduarte
Copy link

Please, set fixed version of @types/jest in deps of @types/testing-library__jest-dom because latest @types/jest 29 installs latest expect "^29.0.0". and "expect" package has node engine requirement that does not support node 12.18.1 and it broke our installation

Hey @olegKusov!
I solved this problem using a resolution in my package.json that override the sub-packages to the same version.

  "dependencies": {
     ...
  },
  "resolutions": {
    "@types/jest": "^27.4.0"
  },

https://classic.yarnpkg.com/en/docs/selective-version-resolutions

@orofbrown
Copy link

This causes another issue, though. If you want to use the recommended setup from the Jest docs and leverage @jest/globals instead of @types/jest, you can't, because this library is forcing the latter to be installed. So you end up with 2 versions of types to pick from, which makes things really confusing, and adds a lot of redundancy to a project. It would be best if that dependency could just be removed

@github-actions
Copy link

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants