react-splide icon indicating copy to clipboard operation
react-splide copied to clipboard

import "@splidejs/react-splide/css"; cannot be found

Open MisterMunchkin opened this issue 2 years ago • 1 comments

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.

Screenshot 2023-03-07 at 10 48 05 AM

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

  1. yarn add @splidejs/react-splide
  2. import Splide, SplideSlide and "@splidejs/react-splide/css" to component
  3. add <Splide><SplideSlide> to jsx
  4. yarn run start (craco start)
  5. see module not found error on css import

Expected Behaviour

I expected it to build successfully and show me a nice carousel.

MisterMunchkin avatar Mar 07 '23 02:03 MisterMunchkin

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.

ngechu avatar Oct 05 '23 16:10 ngechu