Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Uncaught Error: Cannot find module 'swiper' #808

Open
Jackwew opened this issue Aug 25, 2021 · 7 comments
Open

Uncaught Error: Cannot find module 'swiper' #808

Jackwew opened this issue Aug 25, 2021 · 7 comments

Comments

@Jackwew
Copy link

Jackwew commented Aug 25, 2021

nuxt.js use vue-awesome-swiper

image

plugins config:

import Vue from "vue";
import VueAwesomeSwiper from "vue-awesome-swiper";

Vue.use(VueAwesomeSwiper);

nuxt.config.js:

image

package.json

image

I don't know what's wrong. I can't find the swiper all the time

Thank you for helping me look at this question when you have time

@iCloudys
Copy link

use "swiper": "5.4.5",
"vue-awesome-swiper": "4.1.1",

@seosmmbusiness
Copy link

Example to work nuxt 2.15.7 with swiper 6.8.4 =) Unfortunately cannot make it to work with 7 version.

@gleissonneves
Copy link

I have the same problem!!

@tgalfa
Copy link

tgalfa commented Oct 19, 2021

same here

@blackinitial
Copy link

must downgrade swiper version to 6.8.4 and now i can use it

@gleissonneves
Copy link

solve the problem using a similar, the vue-carousel!!
thank you guys

@hacknug
Copy link

hacknug commented Nov 5, 2021

Example to work nuxt 2.15.7 with swiper 6.8.4 =) Unfortunately cannot make it to work with 7 version.

The trick is setting build.standalone: true on your nuxt.config.js. Everything seems to work as expected on my end although I'm not 100% confident this will work for everyone and all setups.

Remember to change to change .swiper-container for .swiper as explained on the migration guide for v7: https://swiperjs.com/migration-guide

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants