Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Swiper version 11: Pagination module not found #7668

Open
6 tasks done
MAGNET-CODE opened this issue Aug 5, 2024 · 1 comment
Open
6 tasks done

Error with Swiper version 11: Pagination module not found #7668

MAGNET-CODE opened this issue Aug 5, 2024 · 1 comment
Labels

Comments

@MAGNET-CODE
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/devbox/swiper-react-pagination-dynamic-qjjdsg?file=%2Fpackage.json%3A7%2C23

Bug description

When using Swiper version 11 with the Pagination module, I am encountering the following error:
Module '"swiper"' has no exported member 'Pagination'. Did you mean to use 'import Pagination from "swiper"' instead?
import { Pagination } from 'swiper/modules';

Expected Behavior

import { Swiper, SwiperSlide } from 'swiper/react';
import 'swiper/css';
import 'swiper/css/pagination';
import '@/styles/swiper.css';
import { Pagination } from 'swiper/modules';

function ProductImageSlider() {
return (
<Swiper
pagination={{
dynamicBullets: true,
}}
modules={[Pagination]}
className="mySwiper"
>
Slide 1
Slide 2
Slide 3
Slide 4
Slide 5
Slide 6
Slide 7
Slide 8
Slide 9

);
}

export default ProductImageSlider;

Actual Behavior

Console Errors:
Module '"swiper"' has no exported member 'Pagination'. Did you mean to use 'import Pagination from "swiper"' instead?ts(2614)

Swiper version

Swiper version: 11.x.x

Platform/Target and Browser Versions

Browser: [Your browser, e.g., Google Chrome 112.0]

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@fassihah
Copy link

fassihah commented Aug 16, 2024

Saya juga mengalami ini, apakah sudah ada jawaban untuk bug semacam ini??

@MAGNET-CODE

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

No branches or pull requests

2 participants