Stackblitz Problem Referencing Swiper Module in an Angular 15 Project

I want to install and use Swiper in a my Stackblitz, but I can't reference it in my component without it erroring out!

Here is what I did so far.

  1. Took this Stackblitz found already created with Angular 15
  2. Typed in swiper in the dependency area where it says 'enter package name' to install it. Looks like no errors and I can see the swiper 8.4.0 reference in the dependency area.
  3. In the app.module.ts file I added the reference and import name like this:

import { SwiperModule } from "swiper/angular";

imports: [ BrowserModule, FormsModule, SwiperModule ],

And it gives me this error:

Can't find package: swiper_angular

Reference:

Here is the swiper site that shows how to install swiper into Angular swiperjs angular installalation

Here is another Stackblitz using Angular 11 that calls and uses swiper successfully Stackblitz using Angular 11 with Swiper

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article