Home » Error: Node Sass version 5.0.0 is incompatible with ^4.0.0.

Error: Node Sass version 5.0.0 is incompatible with ^4.0.0.

To solve Error: Node Sass version 5.0.0 is incompatible with ^4.0.0. error follow below methods.

ERROR LOG

Failed to compile.

./src/App.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/s
ass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/App.scss)
Error: Node Sass version 5.0.0 is incompatible with ^4.0.0.

How to solve Error: Node Sass version 5.0.0 is incompatible with ^4.0.0 ?

The only reason you’re getting that issue is that your node version is incompatible with your node-sass version. This table will assist you in determining which Node.js version can use the node-sass version.

NodeJSSupported node-sass versionNode Module
Node 177.0+102
Node 166.0+93
Node 155.0+, <7.088
Node 144.14+83
Node 134.13+, <5.079
Node 124.12+72
Node 114.10+, <5.067
Node 104.9+, <6.064
Node 84.5.3+, <5.057
Node <8<5.0<57
source : https://www.npmjs.com/package/node-sa

For example, if you’re using Node.js version 12 on your Windows system, then you should have to install the node-sass version 4.12.

npm install node-sass@4.12

So all you have to do now is install the node-sass version recommended by the node-sass team alongside the Node.js version on your PC.

Fix Error: Node Sass version 5.0.0 is incompatible with ^4.0.0 by installing correct node-sass version

Using npm

This is version problem, install the right dependant version.

npm uninstall node-sass
npm install node-sass@4.14.1

Using yarn (default in newer CRA versions)

yarn remove node-sass
yarn add node-sass@4.14.1

Hope the above solution works.

Solve Error: Node Sass version 5.0.0 is incompatible with ^4.0.0 on MAC

Follow the below steps to fix this error :

  1. open node-sass/package.json folder, on Mac:”replace{username} /Users/{username}/github/gasby-hello/node_modules/node-sass/package.json
  2. change version to: “version”: “4.14.1”

Also read :

How to fix This app has been blocked for your protection error on Heroku CLI
ERROR: Preprocessor transform input data failed nvinfer error:NVDSINFER_CUDA_ERROR