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.
Contents
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.
NodeJS | Supported node-sass version | Node Module |
---|---|---|
Node 17 | 7.0+ | 102 |
Node 16 | 6.0+ | 93 |
Node 15 | 5.0+, <7.0 | 88 |
Node 14 | 4.14+ | 83 |
Node 13 | 4.13+, <5.0 | 79 |
Node 12 | 4.12+ | 72 |
Node 11 | 4.10+, <5.0 | 67 |
Node 10 | 4.9+, <6.0 | 64 |
Node 8 | 4.5.3+, <5.0 | 57 |
Node <8 | <5.0 | <57 |
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 :
- open node-sass/package.json folder, on Mac:”replace{username} /Users/{username}/github/gasby-hello/node_modules/node-sass/package.json
- 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