You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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';
Check that this is really a bug
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
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: