react-splide
react-splide copied to clipboard
import "@splidejs/react-splide/css"; cannot be found
Checks
- [X] Not a duplicate.
- [X] Not a question, feature request, or anything other than a bug report directly related to React Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions
Version
0.7.12
Description
I imported Splide, SplideSlide as well as the css like how the documentation stated:
import { Splide, SplideSlide } from "@splidejs/react-splide";
import "@splidejs/react-splide/css";
But it would give me this error when running.
I'm new to react so I don't know if this is relevant but I'm using craco.
Reproduction Link
No response
Steps to Reproduce
- yarn add @splidejs/react-splide
- import Splide, SplideSlide and "@splidejs/react-splide/css" to component
- add <Splide><SplideSlide> to jsx
- yarn run start (craco start)
- see module not found error on css import
Expected Behaviour
I expected it to build successfully and show me a nice carousel.
I have done some digging in the node_modules and have found that the correct location is in '@splidejs/react-splide/dist/css' but it is still throwing an error, I assume that it is been used inside the node_modules and that's why the error is persisted.