./src/index.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/

Viewed 37786

I have this error when I npm start my react project. anyone able to solve this?

./src/index.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./src/index.scss) Module not found: Can't resolve './assets/scss/flag-icon
8 Answers
npm uninstall node-sass;

npm install node-sass@4.14.1
  1. Delete your node_modules folder
  2. Delete package-lock.json or yarn.lock

from the command line, run

  1. yarn install
  2. yarn start

the error is at the end:

Module not found: Can't resolve './assets/scss/flag-icon can you confirm this exists? it's saying it cannot find it

Node Sass is now deprecated now so you can try uninstalling it by using this command:

npm uninstall node-sass

and trying:

npm install --save-dev sass 

This worked for me when I was having issues installing sass on a project using create react app

Node Sass is now deprecated now so you can try uninstalling it by using this command:

npm uninstall node-sass

and trying:

npm install node-sass

This worked for me when I was having issues installing sass on a project using create react app

Type the following command:

npm rebuild node-sass

I hope it works.

I had this same error. To fix this, I had to navigate to

node_modules/resolve-url-loader

open

index.js

and under var options change removeCR from "false" to "true".

I had the same issue and I fixed by doing:

npm audit fix --force

and it works!

Related