davidjerleke / embla-carousel

A lightweight carousel library with fluid motion and great swipe precision.
https://www.embla-carousel.com
MIT License
5.37k stars 164 forks source link

[Bug]: Fade example missing dependency and missing vanilla examples #877

Closed meirroth closed 1 month ago

meirroth commented 1 month ago

Which variants of Embla Carousel are you using?

Steps to reproduce

Click edit source then select the React CodeSandbox and you should see it fails to run due to missing embla-carousel-fade dependency. This is probably is quick fix and I would be willing to create a PR if you point me in the right direction. Also, I think the Vanilla examples are missing.

Expected Behavior

Fancy feature should have...

Additional Context

I have also tried...

What browsers are you seeing the problem on?

No response

Version

No response

CodeSandbox

No response

Before submitting

davidjerleke commented 1 month ago

@meirroth thanks for noticing! You’re right. It’s missing here.

Regarding the vanilla examples I simply need to create them. I can do that in 3-5 hours.

But if you want to do it: It should be added to the Vanilla/SandboxFilesSrc folder. You can follow the AutoHeight setup pretty much.

Best, David

meirroth commented 1 month ago

@davidjerleke Thank you. I'll try.

richgcook commented 1 month ago

I think this is true outside of the examples. I've tried to install the fade plugin with the latest version of embla and get the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: embla-carousel@8.1.0
npm ERR! node_modules/embla-carousel
npm ERR!   peer embla-carousel@"8.1.0" from embla-carousel-auto-scroll@8.1.0
npm ERR!   node_modules/embla-carousel-auto-scroll
npm ERR!     embla-carousel-auto-scroll@"^8.0.4" from the root project
npm ERR!   peer embla-carousel@"8.1.0" from embla-carousel-class-names@8.1.0
npm ERR!   node_modules/embla-carousel-class-names
npm ERR!     embla-carousel-class-names@"^8.0.4" from the root project
npm ERR!   2 more (embla-carousel-reactive-utils, embla-carousel-vue)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! embla-carousel-fade@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: embla-carousel@8.0.2
npm ERR! node_modules/embla-carousel
npm ERR!   peer embla-carousel@"8.0.2" from embla-carousel-fade@8.1.0
npm ERR!   node_modules/embla-carousel-fade
npm ERR!     embla-carousel-fade@"*" 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.
meirroth commented 1 month ago

@richgcook The new Fade plugin works just fine for me locally. Would you mind please opening a new issue with a minimal reproduction so we can debug?

richgcook commented 1 month ago

@meirroth I am using the "embla-carousel-vue": "^8.0.4" if that's maybe the issue... but yes can do!

davidjerleke commented 1 month ago

@richgcook yes please match the plugin version with the core package version so both should be 8.1.0.

richgcook commented 1 month ago

@davidjerleke Thanks for the response. I've tried this but still get an error when trying to npm install embla-carousel-fade

"embla-carousel-auto-scroll": "^8.1.0",
"embla-carousel-class-names": "^8.1.0",
"embla-carousel-vue": "^8.1.0",
npm ERR! While resolving: undefined@undefined
npm ERR! Found: embla-carousel@8.1.0
npm ERR! node_modules/embla-carousel
npm ERR!   peer embla-carousel@"8.1.0" from embla-carousel-auto-scroll@8.1.0
npm ERR!   node_modules/embla-carousel-auto-scroll
npm ERR!     embla-carousel-auto-scroll@"^8.1.0" from the root project
npm ERR!   peer embla-carousel@"8.1.0" from embla-carousel-class-names@8.1.0
npm ERR!   node_modules/embla-carousel-class-names
npm ERR!     embla-carousel-class-names@"^8.1.0" from the root project
npm ERR!   2 more (embla-carousel-vue, embla-carousel-reactive-utils)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! embla-carousel-fade@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: embla-carousel@8.0.2
npm ERR! node_modules/embla-carousel
npm ERR!   peer embla-carousel@"8.0.2" from embla-carousel-fade@8.1.2
npm ERR!   node_modules/embla-carousel-fade
npm ERR!     embla-carousel-fade@"*" from the root project
davidjerleke commented 1 month ago

@richgcook this line is the problem. I will solve it as soon as possible.

davidjerleke commented 1 month ago

@richgcook I just released a bug fix. Please try bumping all your Embla packages to v8.1.3 and let me know how it goes.

Bug fix:

richgcook commented 1 month ago

@davidjerleke Yep all perfect :) Thanks!