I have installed node sass converted my css to scss. Imported my main.scss into my index.js. Then I try to run it and I get that error.
Asked
Active
Viewed 1,459 times
0
-
1Could you provide the content of your `main.scss` file please? – Ron B. May 19 '21 at 20:52
1 Answers
1
Your scss files are being parsed by babel-loader which is causing the above error. If you are using webpack, you need to add sass-loader into the config to parse the required files.
If you are using create-react-app
, you need to install node-sass and it should work.
$ npm install node-sass --save-dev

Saurabh Sharma
- 2,422
- 4
- 20
- 41