DEV Community

verifiedanswer
verifiedanswer

Posted on • Originally published at verifiedanswer.com on

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

While Using Sass I was face the following error Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 in my react web app. Then I found a solution To fix Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 error You Just need to use sass instead of node-sass will resolve this error. Here I am going to share the solution step by step. Let’s get started with this article.

How To Fix Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 Error?

How To fix Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 error?

To fix Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 error If You are using Yarn Dependencies then You should use this command. First of all, just uninstall node-sass by running the following command: yarn remove node-sass now, You need to install sass by running this command: yarn add sass Now, your error will be solved. Thank you.

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

To fix Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 error You just need to use Sass Instead of node-sass because of node-sass is deprecated so You need to remove node-sass you can use this command: npm uninstall node-sass It will uninstall node-sass from your project and now You need to install sass you can use this command: npm install sass Now If You are using sass-loader then I would recommend you to reinstall sass-loader with the following command: npm uninstall sass-loader && npm install sass-loader Now, your error will be solved. Thanks.

Verified Answer: Use Sass Instead of node-sass

To fix Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0 error You just need to use SassInstead of node-sass because node-sass is deprecated so You need to remove node-sass you can use this command.

npm uninstall node-sass
Enter fullscreen mode Exit fullscreen mode

It will uninstall node-sass from your project and now You need to install sass you can use this command.

npm install sass
Enter fullscreen mode Exit fullscreen mode

Now If You are using sass-loader then I would recommend you to reinstall sass-loader with the following command.

npm uninstall sass-loader
npm install sass-loader
Enter fullscreen mode Exit fullscreen mode

Now, your error will be solved. Thanks.

Answer 2: For Yarn Users

If You are using Yarn Dependencies then You should use this command. First of all, just uninstall node-sass by running the following command.

yarn remove node-sass
Enter fullscreen mode Exit fullscreen mode

And now, You need to install sass by running this command.

yarn add sass
Enter fullscreen mode Exit fullscreen mode

Now, your error will be solved. Thank you.

Final Word

You just need to and Then Your error will be solved. If You have any suggestions, queries, or thoughts then Please Comment below. Hope Our Article helps you to solve your error. Thank you.

Also, Read

Top comments (2)

Collapse
 
palzol999 profile image
PalZol

Hello!
I've tried this solution but I've got another EM:
"To import Sass files, you first need to install node-sass. Run npm install node-sass or yarn add node-sass inside your workspace."

Collapse
 
victorhazbun profile image
Victor Hazbun

Same here...