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 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
like image 507
Abraham Avatar asked Sep 20 '25 22:09

Abraham


1 Answers

I've also encountered this problem in my nodejs project.
The error says "Error: Node Sass version 7.0.1 is incompatible with ^4.0.0.""

Here's my current node & npm version:
npm version: 8.1.2
node version: v16.13.1

And my current node-sass & sass-loader:
[email protected]
[email protected]

My solution that works: I just install the following modules:
npm install -D [email protected]
npm install -D [email protected]

Other references:
https://github.com/webpack-contrib/sass-loader/issues/945#issuecomment-836976664

like image 152
Arman Ortega Avatar answered Sep 22 '25 13:09

Arman Ortega