react-alert icon indicating copy to clipboard operation
react-alert copied to clipboard

No compatibility with new react 18

Open bsjaramillo opened this issue 3 years ago • 5 comments

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@"^16.8.1 || ^17" from [email protected] npm ERR! node_modules/react-alert npm ERR! react-alert@"*" 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.

bsjaramillo avatar Apr 25 '22 03:04 bsjaramillo

Fixed it at https://github.com/schiehll/react-alert/pull/191

Blaumaus avatar Apr 30 '22 20:04 Blaumaus

@bsjaramillo also until it's merged you can try out it's fork with the React 18 support - https://www.npmjs.com/package/@blaumaus/react-alert

Blaumaus avatar Apr 30 '22 20:04 Blaumaus

All of a sudden on my latest deployment, I am getting a nasty error from this library. Any ideas what would be causing this?

Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
    React 2
    useTheme useTheme.js:4
    useStyles makeStyles.js:222
    WithStyles withStyles.js:55
    React 14

mdodge-ecgrow avatar Feb 21 '23 19:02 mdodge-ecgrow

I couldn't figure out that error and was under a time crunch. I have switched over to https://github.com/fkhadra/react-toastify . That package seems to be much better maintained.

mdodge-ecgrow avatar Feb 21 '23 22:02 mdodge-ecgrow