Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js)


In the folder app, I created a folder styles > custom > loader.scss. Then, in the styles.scss file, I add this import:

@import "styles/custom/loader.scss";

The problem is that I have an error message:

./src/styles.scss - Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):

@import "styles/custom/loader.scss";

I don’t know how can I solve this problem, please.

Files structure:

enter image description here

I don’t know how can I solve this problem please?


You are using an incorrect path based on how your files are structured. Try doing so instead:

@import "./app/styles/custom/loader.scss";

Answered By – yousoumar

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published