Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0 in React.js

I tried to install sass-loader to compile scss, but it shows a version compatibility error. I downgrade the version and did so many things, but still shows the same issue.

React version- 17.0.2 node version- 16.2.0 npm version - 7.13.0

Package.json

  "dependencies": {
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "antd": "^4.16.2",
    "node-sass": "^4.14.1",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-redux": "^7.2.4",
    "react-scripts": "4.0.3",
    "redux-saga": "^1.1.3",
    "web-vitals": "^1.0.1"
  },

enter image description here

like image 235
Hema Ramasamy Avatar asked Jun 08 '21 17:06

Hema Ramasamy


1 Answers

You could try uninstalling node-sass and replacing it with sass. That did it for me.

npm un node-sass
npm i -D sass
like image 175
aifodu Avatar answered Sep 21 '22 20:09

aifodu