Module not found: Can't resolve 'slick-carousel/slick/slick.eot'

Following the documentation, at step 4 I’ve added the relative paths.
For some reason when I attempt to run yarn run build the following error is returned:

ERROR in ./styles/main.scss
Module build failed: ModuleNotFoundError: Module not found: Error: Can’t resolve ‘slick-carousel/slick/slick.eot’

Does anyone have a suggestion as to what could be the cause of this issue?

1 Like

Hi @BSpoon,

I tested this by setting up a new copy of Sage and then running:

yarn add slick-carousel

Adding this to main.js:

import 'slick-carousel/slick/slick.min';

And this to main.scss:

@import "~slick-carousel/slick/slick.scss";
@import "~slick-carousel/slick/slick-theme.scss";

And finally this to _variables.scss:

$slick-font-path: "~slick-carousel/slick/fonts/";
$slick-loader-path: "~slick-carousel/slick/";

Then running:

yarn build

And I didn’t receive an error. Can you double check what you added against the above?

6 Likes

Hi @mmirus,

Turns out it was a missing slash that caused the issue. :tired_face:

$slick-font-path: "~slick-carousel/slick/fonts";

should have been:

$slick-font-path: "~slick-carousel/slick/fonts/";

Thank you though for taking your time to help me resolve this.

Happy Weekend :grin:

2 Likes