NextJS 14: Swiper only shows first slide #65570
Labels
bug
Issue was opened via the bug report template.
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
Developer Experience
Issues related to Next.js logs, Error overlay, etc.
invalid link
The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Link to the code that reproduces this issue
https://wave-riders-ecommerce.vercel.app/
To Reproduce
Check what is happening on the production link, I can't explain it better than this: https://wave-riders-ecommerce.vercel.app/
Current vs. Expected behavior
Expected Behavior
The swiper should display all 3 slides/Images instead of just one.
Actual Behavior
Only showing one slide
Provide environment information
Which area(s) are affected? (Select all that apply)
create-next-app, Developer Experience
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local), Vercel (Deployed)
Additional context
In my NextJS 14 app, I am trying to get a Swiper working.
My issue is that only the first slide works, the other ones are not visible. When I console.log my slide images to ensure they are loaded correctly, I can see that they are so the issue isn't there. If I put the same image for all the slides, only the first one loads still. So the issue isn't from the images I am trying to use in my swiper. I also tried several other packages offering carousels/swipers, and even written by myself without a package, all the codes I have tried led to the same issue, one slide only. I figured at some point that it looks like the 3 images/ slides are actually appearing yet the last two for just a second, then they vanish, leaving only the first one on screen. It really seems to be the case with every swipers. I also tried "use client", without success...
You can check the issue on this page, it's the carousel swiper on this same page: https://wave-riders-ecommerce.vercel.app/
Please note that the first slide is also controllable with the mouse while the other 2 aren't. Which means they probably just aren't there, while the pagination shows my three items properly...
Here is my code:
I have tried downgrading my swiper version as I used it in a recent NextJS project in which I had no issue, but no luck either. I also tried downgrading my NextJS version, nothing either.
Here is what my current package.json looks like, in case it may help...
Hope someone can help! Thanks :)
The text was updated successfully, but these errors were encountered: