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

Won't install on React 17 #362

Closed
1 task done
boris61 opened this issue Sep 6, 2022 · 6 comments · Fixed by #392
Closed
1 task done

Won't install on React 17 #362

boris61 opened this issue Sep 6, 2022 · 6 comments · Fixed by #392
Labels
bug Something isn't working resolved This issue is resolved

Comments

@boris61
Copy link

boris61 commented Sep 6, 2022

Bug is related to

  • embla-carousel-react

Embla Carousel version

  • v7.0.2

Describe the bug

  • npm install embla-carousel-react --save fails with React 17.0.2

Expected behavior

  • Should install

Additional context

  • image
@boris61 boris61 added the bug Something isn't working label Sep 6, 2022
@th-km
Copy link
Contributor

th-km commented Sep 6, 2022

@boris61 This is not a bug, you need to run npm install embla-carousel-react --legacy-peer-deps as mentioned in your log.

@boris61
Copy link
Author

boris61 commented Sep 6, 2022

Thanks. Closing the issue.

@boris61 boris61 closed this as completed Sep 6, 2022
@davidjerleke davidjerleke added not a bug This issue is not a bug resolved This issue is resolved and removed bug Something isn't working labels Sep 6, 2022
@boris61
Copy link
Author

boris61 commented Sep 6, 2022

Reopening for a question. Installing with --legacy-peer-deps was fine and everything worked afterwards, but I still fail to see how this is not an issue. I won't ask every member of our team to install it manually, our package.json changes regularly. So the only way is to add legacy-peer-deps=true to .npmrc and that's a global project flag and not a good solution. So save for that and actually upgrading to React 18.1.0,, am I missing some other workaround?

@boris61 boris61 reopened this Sep 6, 2022
@davidjerleke
Copy link
Owner

davidjerleke commented Sep 6, 2022

Hi @boris61,

Thank you for your question.

I still fail to see how this is not an issue

To be honest, I fail to see why this would be a problem specific to embla-carousel-react? This StackOverflow thread explains why this is happening so please take some time to read it. And I'm sure there's more information about it elsewhere too. Unfortunately we have to live with this because it's caused by a major NPM release (7+) with breaking changes.

Best,
David

@boris61
Copy link
Author

boris61 commented Sep 6, 2022

Thanks for explanation and the link.

@davidjerleke davidjerleke linked a pull request Nov 8, 2022 that will close this issue
@davidjerleke davidjerleke added bug Something isn't working and removed not a bug This issue is not a bug labels Nov 8, 2022
@davidjerleke
Copy link
Owner

@boris61 I have an update on this issue. Thanks to @horseeyephil's contributions, you can install embla-carousel-react without the --legacy-peer-deps from v7.0.5 and up. I didn't know that an or syntax was valid in the package.json peerDependecies field. Read more about the release here.

Cheers,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved This issue is resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants