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.
Error with scss when importing to index.js
1.8k views Asked by John Bottega At
1
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.
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