react-custom-scrollbars-2
react-custom-scrollbars-2 copied to clipboard
Can not install with react 18
Hi, trying to install this package using npm but it seems like it has conflicts with react 18, here are the logs:
$ npm install react-custom-scrollbars-2 --save
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@"^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 || ^16.0.0 || ^17.0.0" from [email protected]
npm ERR! node_modules/react-custom-scrollbars-2
npm ERR! react-custom-scrollbars-2@"*" 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.
Should probably add react ^18.0.0
to the list of peer dependencies as well.
the same problem
up
same
Works great with react 18, may you update peerDeps, please?
This repo is due to the original (fantastic) react-custom-scrollbars package going a little stale and we needed a handful of bug fixes which will be managed here.
Is this repo repeating the history? Will somebody else fork new react-custom-scrollbars-{N+1}
for every new major React ^{X+1}
release because previous react-custom-scrollbars-{N}
stale on React ^{X}
?
If someone finds a solution to this problem please let us know, I am also having the same issue.
Well, if it
Works great with react 18
then you can just npm i --legacy-peer-deps react-custom-scrollbars-2
, but it inconvenient in some cases. /C.O./
Sorry I am a bit new, could you explain what the "--legacy-peer-deps" tag does and how can it be inconvenient? Thanks!
@sgarg15 , Modern npm
installs packages from peerDependencies
for you (and this cause extra checks). In old versions it didn't (just displaying advices for you), so you care yourself to install appropriate packages with respect to advices raised from peerDependencies
.
So, when you having React 18 installed do npm i --legacy-peer-deps react-custom-scrollbars-2
, you say to npm
to skip modern handling for peerDependencies
.
The problem with that may raise later, for example, when you delete node_modules/
and run npm i
without arguments instead of npm ci
. I don't know exactly full background and results of --legacy-peer-deps
.
Apologies for the delay - v4.5.0 now released with React 18 support! Thank you @AlekseyManetov 🚀
Apologies for the delay - v4.5.0 now released with React 18 support! Thank you @AlekseyManetov 🚀
still doesn't work with react 18.2.0