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

npm ERR! Could not resolve dependency: npm ERR! peer react@">15.4.2 <17.0.0" from [email protected] #398

Open
bgwd666 opened this issue Jan 18, 2022 · 6 comments · May be fixed by #399
Open

Comments

@bgwd666
Copy link

bgwd666 commented Jan 18, 2022

Expected Behavior

npm ERR! Could not resolve dependency:
npm ERR! peer react@">15.4.2 <17.0.0" from [email protected]
npm ERR! node_modules/react-intl-tel-input
npm ERR! react-intl-tel-input@"^8.2.0" from the root project

Current Behavior

Possible Solution

Steps to Reproduce

Code:

Environment

  • Version:
  • Browser:

Detailed Description

@landsman
Copy link

landsman commented Feb 1, 2022

I have the same problem, please add support for latest react version 🙏

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@">15.4.2 <17.0.0" from [email protected]
npm ERR! node_modules/react-intl-tel-input
npm ERR!   react-intl-tel-input@"^8.0.4" 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.
npm ERR!
npm ERR! See /Users/landsman/.npm/eresolve-report.txt for a full report.

@andrewsantarin
Copy link
Contributor

andrewsantarin commented Feb 2, 2022

These should be adequate:

  • broaden the range of supported react & react-dom versions in peerDependencies
  • bump the React devDependencies for TypeScript and JavaScript

The official blog says that breaking changes exist, but I doubt that the code depends on any of the affected features. The most time-consuming part about making the update would be UI tests to verify that the API is still intact.

Let me try PR'ing a fix this upcoming weekend. @bgwd666 @landsman @mcataford @patw0929

@andrewsantarin andrewsantarin linked a pull request Feb 2, 2022 that will close this issue
7 tasks
@ahsan-alii
Copy link

I am also stuck in this issue, did you get any solution ?

@LeaMarco
Copy link

LeaMarco commented Mar 10, 2022

I am also stuck in this issue, did you get any solution ?

I was able to "fix" it using an older version of node to install it(in my case 14.18.0). After that, you can return to your current node version and run it.

@justinkunz
Copy link

You can add an override into your package json, forcing the react and react-dom version to use the root installed version:

package.json
{
 // ...
   "overrides": {
    "react": "$react",
    "react-dom": "$react-dom"
  },
}

@dev-ce01
Copy link

dev-ce01 commented Feb 2, 2024

I my case, I install dependency using yarn
yarn add react-intl-tel-input

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

Successfully merging a pull request may close this issue.

7 participants