Reputation: 53
When I start a React app with npm start, I got this error.How I fixed this error?
./src/App.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5
-3!./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./src/App.scss)
Error: Node Sass version 8.0.0 is incompatible with ^4.0.0.
Here is the screenshot of error
Upvotes: 1
Views: 7212
Reputation: 138
I had the similar error in one of my angular projects and I did try npm uninstall node-sass
and npm install sass
but it was giving the same error.
So, this process below worked for me (in Windows)
Upvotes: 0
Reputation: 15640
The module node-sass
is now deprecated and replaced with a more robust new version which is sass
. Only change the module and all would work fine. You can uninstall the old one and install the new one:
npm uninstall node-sass
npm install sass
And all Works same !
node-sass
anywaysTo avoid the error, you can use the following table to install the appropriate version node-sass
for your installed Node.js version which you can check by the command node --version
.
npm install node-sass@(your version)
Upvotes: 5