patw0929 / react-intl-tel-input

Rewrite International Telephone Input in React.js. (Looking for maintainers, and PRs & contributors are also welcomed!)
https://patw0929.github.io/react-intl-tel-input/
MIT License
283 stars 222 forks source link

npm ERR! Could not resolve dependency: npm ERR! peer react@">15.4.2 <17.0.0" from react-intl-tel-input@8.2.0 #398

Open bgwd666 opened 2 years ago

bgwd666 commented 2 years ago

Expected Behavior

npm ERR! Could not resolve dependency: npm ERR! peer react@">15.4.2 <17.0.0" from react-intl-tel-input@8.2.0 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

1. 2. 3. 4.

Code:

Environment

Detailed Description

landsman commented 2 years ago

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: app@0.1.0
npm ERR! Found: react@17.0.2
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 react-intl-tel-input@8.2.0
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 commented 2 years ago

These should be adequate:

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

ahsan-alii commented 2 years ago

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

LeaMarco commented 2 years ago

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 commented 2 years ago

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 commented 8 months ago

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