react-simple-oauth2-login icon indicating copy to clipboard operation
react-simple-oauth2-login copied to clipboard

Not working with react 18+

Open alxnik opened this issue 2 years ago • 10 comments

It seems that the package has a dependency for react 16-17. Is this a matter of testing or are there breaking changes in react 18?

alxnik avatar Jul 09 '22 11:07 alxnik

Thank you for reporting. No, there are no actual reason for stating versions 16-17. It was just a quick change from the original version, which stated React 15.

bhubr avatar Jul 09 '22 13:07 bhubr

@bhubr can the project start supporting react 18?

This is what we get:

npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.0 - 17" from [email protected]

desoss avatar Nov 11 '22 11:11 desoss

@desoss OK I'm gonna have a little time after a long streak of work. I'll try and fix it ASAP.

bhubr avatar Nov 11 '22 15:11 bhubr

@desoss Sorry for the delay. I'm about to publish an update, but I'm having trouble with my NPM account, due to a problem with 2FA.

In the meantime I can propose you a workaround:

I hadn't stumbled upon this issue because I usually use Yarn instead of NPM. Yarn isn't as strict as NPM and lets you install "incompatible" peer dependencies with warnings instead of errors.

If you never used Yarn before:

  1. install it: npm i -g yarn

  2. in your React app's directory, run:

    • rm package-lock.json (remove NPM lockfile)
    • yarn (install dependencies with yarn)
    • yarn add react-simple-oauth2-login (install the lib)

bhubr avatar Nov 14 '22 08:11 bhubr

Hey @bhubr, I managed to install it through yarn last week! I confirm that it works. So no hurries. Nevertheless, don't forget the npm support for newcomers.

desoss avatar Nov 14 '22 08:11 desoss

@desoss Hi!

I just published v0.5.4 which solves the problem. Instead of specifying a range such as 16-17, all React versions from 16 are now accepted.

Thank you again for reporting, and sorry @alxnik for not handling the issue earlier.

bhubr avatar Nov 14 '22 08:11 bhubr

@all-contributors please add @alxnik for bug

bhubr avatar Jan 19 '23 20:01 bhubr

@bhubr

I've put up a pull request to add @alxnik! :tada:

allcontributors[bot] avatar Jan 19 '23 20:01 allcontributors[bot]

@all-contributors please add @desoss for bug

bhubr avatar Jan 19 '23 20:01 bhubr

@bhubr

I've put up a pull request to add @desoss! :tada:

allcontributors[bot] avatar Jan 19 '23 20:01 allcontributors[bot]