I recently updated the package for my project
- Utilizing Ionic and Angular to create applications for iOS and Android
- Current versions: Ionic 7, Angular 16
Following a recommendation, I made the switch from 'ion-slides' to the Swiper.js library due to deprecation in version 6.0.0 and removal in v7.0.0.
The ion-slides feature has been deprecated and removed. It is advised to utilize the Swiper.js library directly instead.
To comply with this change, I upgraded to the latest version of swiper (version=9.3.2)
However, upon updating my package.json and running ionic build
, an issue arose:
./node_modules/ionic2-calendar/fesm2020/ionic2-calendar.mjs:8:0-37 - Error: Module not
found: Error: Package path ./angular is not exported from package
/Users/admin/Projects/<name_project>/node_modules/swiper (see exports field in
/Users/admin/Projects/<name_project>/node_modules/swiper/package.json)
After examining the contents of node_modules/swiper
, I was unable to find the angular path as required by ionic2-calendar. The code within ionic2-calendar attempts to import swiper/angular:
import * as i3 from 'swiper/angular';
import { SwiperModule } from 'swiper/angular'
A reference on Stack Overflow implies that Swiper Version 9 lacks support for Angular, indicating a need to adapt to a new approach. While I have implemented these changes in my own codebase, third-party packages like ionic2-calendar may still be relying on the previous implementation.
Given this scenario, what would be the best course of action? Should I revert back to version 8 of Swiper?