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

Indiana Drag Scroll is not working with React 19 #94

Open
ShahidNauman opened this issue Dec 30, 2024 · 1 comment
Open

Indiana Drag Scroll is not working with React 19 #94

ShahidNauman opened this issue Dec 30, 2024 · 1 comment

Comments

@ShahidNauman
Copy link

I updated my Vite project to React 19, but unfortunately the current/next version of react-indiana-drag-scroll doesn't work with it.

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"^19.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from [email protected]
npm error node_modules/react-indiana-drag-scroll
npm error   react-indiana-drag-scroll@"3.0.3-alpha" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
@multivoltage
Copy link

@Norserium
I tried to fix it and forked the repo but I had a lot of error about lint etc etc.
I arrived ad one point where both example and the lib works.
I tried also react 19 (on my codebase based on previous point) and it works.
After that I restore react 17 in both example and the lib.

So my conclusion is that the error come from an obsolete peer dependency.
We can add "|| ^19.0.0" (and maybe remove 15...)

We can proceed with 2 solutions if you agree

  • I will open a PR with only a commit in "package.json" where I add "^19"
  • I will open a PR with A LOT OF changes (for example cra with version 5 since there is vrsion 2.x in this project)

Since the project seem old maybe a good idea id to rework all like:

  • use turborepo to handle multirepo (lib and example)
  • use CRA 5.x like I did (or maybe vite...)
  • drop support for react 15/16
  • use fixed node version
  • add instructions to readme for developer.

We use this library in a production site. That' why I'm here :)

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

No branches or pull requests

2 participants