schiehll / react-alert

alerts for React
MIT License
608 stars 98 forks source link

No compatibility with new react 18 #192

Open bsjaramillo opened 2 years ago

bsjaramillo commented 2 years ago

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: solesesteluquis@0.1.0 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@"^16.8.1 || ^17" from react-alert@7.0.3 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.

Blaumaus commented 2 years ago

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

Blaumaus commented 2 years ago

@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

mdodge-ecgrow commented 1 year ago

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 commented 1 year ago

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.