Closed boris61 closed 2 years ago
@boris61 This is not a bug, you need to run npm install embla-carousel-react --legacy-peer-deps
as mentioned in your log.
Thanks. Closing the issue.
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?
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
Thanks for explanation and the link.
@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
Bug is related to
Embla Carousel version
Describe the bug
npm install embla-carousel-react --save
fails with React 17.0.2Expected behavior
Should install
Additional context