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

Conflict with React version and enzyme-adapter-react-16 #1532

Closed
gautam-divyanshu opened this issue Feb 3, 2024 · 7 comments
Closed

Conflict with React version and enzyme-adapter-react-16 #1532

gautam-divyanshu opened this issue Feb 3, 2024 · 7 comments
Labels
bug Something isn't working unapproved

Comments

@gautam-divyanshu
Copy link
Member

Bug Description

While trying to install packages, I encountered an ERESOLVE error related to a conflict between the version of React our project is using (17.0.2) and the version required by enzyme-adapter-react-16 (16.x.x).

Steps to Reproduce

  1. Run npm install in the project root directory.

Expected Behavior

The packages should install without any errors.

Actual Behavior

The installation fails with the following error message:

I've tried several solutions including using the --legacy-peer-deps flag, downgrading React, and upgrading enzyme-adapter-react-16, but none have resolved the issue.

If anyone has encountered this issue before or has any suggestions on how to resolve it, your help would be greatly appreciated.

Thank you!
image

@gautam-divyanshu gautam-divyanshu added the bug Something isn't working label Feb 3, 2024
Copy link

github-actions bot commented Feb 3, 2024

Congratulations on making your first Issue! 🎊 If you haven't already, check out our Contributing Guidelines and Issue Reporting Guidelines to ensure that you are following our guidelines for contributing and making issues.

@Cioppolo14
Copy link

@aarishshahmohsin If you are going to make a best practice issue that covers this issue as well, please let me know so I can close this as a duplicate.

@samiali12
Copy link

@gautam-divyanshu just tried npm install --legacy-peer-dep

@gautam-divyanshu
Copy link
Member Author

@samiali12 It iqnores the warnings, these may cause trouble during runtime.

@palisadoes
Copy link
Contributor

We don't want to use this command. Our apps must use current packages even if it means using replacement packages. We have opened issues in the past to rectify this on the develop branch

npm install --legacy-peer-dep

@aarishshahmohsin
Copy link
Contributor

@palisadoes @Cioppolo14 I have made the issue (link). Please tell if I should make any changes to issue.

@palisadoes
Copy link
Contributor

Closing in favor of this issue:

@palisadoes palisadoes closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unapproved
Projects
None yet
Development

No branches or pull requests

5 participants