Module not found: Error: Package path ./swiper.min.css is not expoot exported from package D:\Frontend\React\movie-app\node_mswiper rted fromodules\swiper (see exports field in D:\Frontend\React\movieles\swirts field-app\node_modules\swiper\package.json)
I'm getting this error and cant deploy the project. I am able to see it in localhost. Please help me out..
As the documentation says: https://ionicframework.com/docs/react/slides
There are various different ways of importing the Swiper .css depending on what technologies you are using.
This is how it is imported in the documentation example
import 'swiper/swiper.min.css';
But just below that it says
Not using Create React App? You can import the Swiper CSS from swiper/css instead.
So in my case where I am developing my app in Ionic, my import would look like this:
import 'swiper/css';
There are other options as well depending on how you are styling your sheets.
For developers using SCSS or Less styles, Swiper also provides imports for those files.
For Less styles, replace css with less:
import 'swiper/swiper.less';
For SCSS styles replace css with scss: import 'swiper/swiper.scss';
Hope it helps!
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