Swiper Vue component not working with Vue3+Nuxt3 SSR #5237
Replies: 4 comments 1 reply
-
It appears to be module related. That error from core.js, is of this code:
After I removed any module use from my component, it's working without any errors. I'd still welcome fixes for the issue, since I'd like to use Swiper modules still. |
Beta Was this translation helpful? Give feedback.
-
Using relative links directly to the module script files got everything working again.
|
Beta Was this translation helpful? Give feedback.
-
NVM, still doesn't work. Component renders correctly, but it breaks vue/nuxt behind the scenes. Vue Router stops working and unable to navigate away from page. |
Beta Was this translation helpful? Give feedback.
-
Did you find any solution? i also have problems with Swiper, Vue and SSR:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm using a fairly fresh tech stack - Vue3 SSR + Nuxt3 + Vite. I'm having trouble getting Swiper running. I always see the following errors in terminal, whether it's functioning or not:
I started with the demo code here: https://swiperjs.com/vue#usage second code example under "Usage". Swapped css for scss.
If I start on one page of my site, then navigate via Vue Router to the page with the Swiper component, it seems to work perfectly. I still see the above errors in console, but they don't seem to matter. If I instead load the page with the Swiper component first, Vue breaks and will not load the page. It shows the following error:
In console I see:
Any ideas? I had trouble finding if Swiper Vue support is just Vue2 at the moment or if it's something with my setup that's breaking the component.
Beta Was this translation helpful? Give feedback.
All reactions