Accepted answer


  1. npm uninstall node-sass
  2. npm install sass

or, if using yarn

  1. yarn remove node-sass
  2. yarn add sass

edit3: yes, another edit. moving to sass (dart-sass) is the best solution. previous one included locking node-sass to version 4.x.x, which is 2 years old and lacks newer scss features.

edit2: sass-loader v10.0.5 fixes it. the problem is you might not be using it as a project dependency, but more as a dependency of your dependencies. cra uses a fixed version, angular-cli locks to node-sass v4, and so on.

the recommendation for now is: if you're installing just node-sass, check the below workaround (and the note). if you're working on a blank project and you can manage your webpack configuration (not using cra or a cli to scaffold your project), install the latest sass-loader.

edit: this error comes from sass-loader. there is a semantic versioning mismatch since node-sass @latest is v5.0.0 and sass-loader expects ^4.0.0.

there is an open issue on their repository with an associated fix that needs to be reviewed. until then, refer to the solution below.

workaround: don't install node-sass 5.0.0 yet (the major version was just bumped).

uninstall node-sass

npm uninstall node-sass

then install the latest version (before 5.0)

npm install node-sass@4.14.1

note: libsass (hence node-sass as well) is deprecated and dart-sass is the recommended implementation. you can use sass instead, which is a node.js distribution of dart-sass compiled to pure javascript.


steps to resolve this issue:

  1. go to your node_module folder and open node-sass modules.

  2. in the package.json file inside node-sass, change the version from "5.0.0" to "4.14.1".

  3. finally in the package.json at the root of the main project again change node-sass version from "5.0.0" to "4.14.4."

this should work.


in app.js or wherever the css is being imported, make sure to import css and not scss. the script in package.json will create a css file and that's what should be imported.

    "scss": "node-sass --watch -include-path src/scss -o src/css"

this script will watch a scss file inside of a folder called scss that is inside src. it will then create an css folder inside src and add a css file inside that folder, this is the file you should import in app.js

to run the script:

npm run scss

file structure example: src/scss/styles.scss

css file created by script: src/css/styles.css


or else rebuild your node-sass so that the compatibility does not produce an error. when the incompatibility between node-sass and node occurs, you will get typescript errors . do this to achieve node-sass compatibility.

npm rebuild node-sass


this error is due to an incompatible version of the sass loader with node-sass.

add these dependencies at the end of your package.json file.

note: you can google to check which sass-loader version is compatible with your node-sass version.

"devdependencies": { "node-sass": "^6.0.1", "sass-loader": "^10.2.0" }


updated answer

please note node sass is depreciated and you may replace it by dart sass:

warning: libsass and node sass are deprecated. while they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new css or sass features. projects that still use it should move onto dart sass.


the below recipe helped me:

  1. uninstall node-sass:
    • npm: npm uninstall node-sass
    • yarn: yarn remove node-sass
  2. uninstall sass-loader:
    • npm: npm uninstall sass-loader
    • yarn: yarn remove sass-loader
  3. install dart sass as a development dependency
    • npm: npm install sass -dev
    • yarn: yarn add sass -dev

before build, you should also:

  1. remove node_modules directory
  2. remove lock file:
    • npm: remove package-lock.json
    • yarn: remove yarn.json


small update: in case if you get the below error in regard to node-sass, follow the steps given below.

code eperm npm err! syscall unlink

steps to solve the issue:

  1. close visual studio
  2. manually remove .node-sass.delete from node_modules
  3. open visual studio
  4. npm cache verify
  5. npm install node-sass@4.14.1


just change version to: "version": "4.14.1" in your package.json file


adding sass-loader as as dev-dependency solved this for me. "devdependencies": { "node-sass": "^6.0.0", "sass-loader": "^11.1.1" }


delete a yarn.lock file in the project and

yarn remove node-sass
yarn add node-sass


if the error is

error: node sass version 5.0.0 is incompatible with ^4.0.0

step1: stop the server

step2: run commands are npm uninstall node-sass

step3: check node-sass in package.json if node-sass is available in the file then again run step2.

step4: npm install node-sass@4.14.1 <=== run command

step5: wait until the command successfully runs.

step6: start-server using npm start


i met the same issue, and here's how i was able to fix it:

firstly, you have to know which node-sass version you are using in your project. then go upgrade or downgrade your current node.js version to the compatible version with your current node-sass version, you can know that from this link.

of course, stop the server, and close your ide.

so, the best way to upgrade or downgrade the node.js version, has mentioned above in this answer. then remove the node_modules, and package-lock.json and install again... you can do it as such:

npm cache clean --force

rm -rf /node_modules package-lock.json

npm install

npm audit fix

npm run <your_script_name>


you can just switch to sass since node-sass is deprecated now anyway

in your package.json

"node-sass": "npm:sass@^1.49.9",

react still asks for node-sass after removing it and replacing with sass so you can alias it like this and now react will use sass


it worked for me after adding particular version of node-sass package (node-sass@4.14.1)


according to the edit2 of nicolas hevia telling that

sass-loader v10.0.5 fixes it

i launched this command:

npm install sass-loader@^10.0.5 node-sass --save-dev

that fixed my issue.

be aware that i am in a development environment. in other cases, the option --save-dev should be removed.


this is version problem. install the right dependent version:

npm uninstall node-sass
npm install node-sass@4.14.1


using npm,

  1. npm uninstall node-sass
  2. npm install node-sass
  3. change the "react-scripts": "4.0.0" into "react-scripts": "4.0.3" in package.json and save
  4. npm install
  5. npm start

or, using yarn -

  1. yarn remove node-sass
  2. yarn add --dev node-sass
  3. as above
  4. yarn install
  5. yarn start


if you happen to use cra with the default yarn package manager, use the following. it worked for me.

yarn remove node-sass
yarn add node-sass@4.14.1


the best solution for me was uninstalling node-sass.

npm uninstall node-sass

then install sass:

npm install sass

for those using yarn:

yarn remove node-sass
yarn add sass


node-sass aka libsass is officially deprecated as of october 26 2020 and instead you should use sass aka dart sass.

for npm you could do:

npm uninstall node-sass
npm install sass --save-dev

for yarn do:

yarn remove node-sass
yarn add sass


uninstall node-sass:

npm uninstall node-sass

use sass by:

npm install -g sass
npm install --save-dev sass


the only one reason why you get some error like that, is because your node.js version is not compatible with your node-sass version.

so, make sure to checkout the documentation at node-sass.

or this image below will be help you in deciding what node.js version can use the node-sass version.

enter image description here

for an example, if you're using node.js version 12 on your windows system ("maybe"), then you should have to install the node-sass version 4.12.

npm install node-sass@4.12

yeah, like that. so now you only need to install the node-sass version recommended by the node-sass team with node.js version installed on your computer.

Related Query

More Query from same tag