I tried to follow https://swiperjs.com/angular but I got this error, I also installed npm i @types/swiper but still the same error . Here is the error
ERROR in node_modules/swiper/angular/angular/src/swiper.component.d.ts:5:117 - error TS2307: Cannot find module 'swiper/types' or its corresponding type declarations.
5 import { SwiperOptions, SwiperEvents, NavigationOptions, PaginationOptions, ScrollbarOptions, VirtualOptions } from 'swiper/types';
my app module
import { SwiperModule } from 'swiper/angular';
@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule ,
    ReactiveFormsModule,
    HttpClientModule,
    SwiperModule
  ],
and in my global style, I added
@import "~@angular/material/theming";
@import '~swiper/swiper-bundle';
                You have to reduce the version of swiper js to run. example: npm i [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With