reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
10.88k stars 7.46k forks source link

npm install react-rangeslider not working with latest react #4587

Closed HidayatLahabu closed 2 years ago

HidayatLahabu commented 2 years ago

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: react@18.0.0 npm ERR! node_modules/react npm ERR! react@"^18.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^0.14.0 || ^15.0.0" from react-rangeslider@2.2.0 npm ERR! node_modules/react-rangeslider npm ERR! react-rangeslider@"*" 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! A complete log of this run can be found in:

Found: react@18.0.0 node_modules/react react@"^18.0.0" from the root project

Could not resolve dependency: peer react@"^0.14.0 || ^15.0.0" from react-rangeslider@2.2.0 node_modules/react-rangeslider react-rangeslider@"*" from the root project

Fix the upstream dependency conflict, or retry this command with --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.

HidayatLahabu commented 2 years ago

npm i react-rangeslider --legacy-peer-deps solved the issue