Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm using Node.js 16.13.1 and created a React application and try used Sass, but when I try to run it, I get this error:

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

like image 719
anderson j mariño o. Avatar asked Dec 08 '21 20:12

anderson j mariño o.


People also ask

How do I check Sass version?

To check the version, run the command: sass –version. The latest version is 1.49.

Is node Sass deprecated?

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.

What is the difference between node Sass and Sass?

Node-sass is a library that provides binding for Node. js to LibSass, the C version of the popular stylesheet preprocessor, Sass. It allows you to natively compile . scss files to css at incredible speed and automatically via a connect middleware.


1 Answers

If you want to use SCSS and Sass in your React app, try to do this:

First remove node-sass:

yarn remove node-sass

If you use npm:

npm uninstall node-sass

Then install sass instead of node-sass:

yarn add -D sass

or

npm i -D sass

Finally your SCSS and Sass files will be correctly compiled!

like image 163
superdunck Avatar answered Oct 10 '22 18:10

superdunck