juliencrn / usehooks-ts

React hook library, ready to use, written in Typescript.
https://usehooks-ts.com
MIT License
6.52k stars 421 forks source link

[BUG] Update React dependency to 19 #650

Open michal-worwag opened 1 week ago

michal-worwag commented 1 week ago

Describe the bug

Hello,

When I try to install package I've got error ;

npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: hello-in-it-v2@0.1.0 npm error Found: react@19.0.0-rc.0 npm error node_modules/react npm error react@"19.0.0-rc.0" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^16.8.0 || ^17 || ^18" from usehooks-ts@3.1.0 npm error node_modules/usehooks-ts npm error usehooks-ts@"*" 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

I use Next.js 15.0.2 which use React 19.

Package can be installed with --legacy-peer-deps

To Reproduce

Use Next.js 15 and try to install package.

Expected behavior

Error and aborted installation of package. Need to use npm i usehooks-ts --legacy-peer-deps

Additional context

No response

michal-worwag commented 1 week ago

https://github.com/juliencrn/usehooks-ts/pull/651

abdonrd commented 1 week ago

Same as https://github.com/juliencrn/usehooks-ts/issues/602