reactjssasscreate-react-appnode-sass

Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0


I have a react project I created using create-react-app And I was trying to use sass in react by installing node-sass for react.js

But I keep getting an error saying It's incompatible.

Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0

Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0

What is the problem?

Error: 'node-sass' version 5.0.0 is incompatible with ^4.0.0 Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0 in React.js

Solution

  • Install sass instead

    The library node-sass is now deprecated. So you can use the new version sass

    Do the following

    npm uninstall node-sass
    npm install sass
    

    Works with no further changes