sass / node-sass

:rainbow: Node.js bindings to libsass
https://npmjs.org/package/node-sass
MIT License
8.51k stars 1.32k forks source link

Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0. #3103

Closed semihraifgurel closed 3 years ago

semihraifgurel commented 3 years ago

npm ERR! code ELSPROBLEMS npm ERR! invalid: node-sass@6.0.0 /Users/semihraifgurel/GitHub.noindex/theme-landing/node_modules/node-sass

npm ERR! A complete log of this run can be found in: npm ERR! /Users/semihraifgurel/.npm/_logs/2021-05-10T07_38_04_899Z-debug.log semihraifgurel@Semih-MacBook-Pro theme-landing %

vivekv2k commented 5 months ago

First, you need to understand why this error is occurring. The reason is that node-sass is not compatible with your sass-loader, so you need to match the node-sass version with the sass-loader. First of all, check your Node.js version, and second, check your sass-loader and node-sass versions. For example:

Check each of the versions to ensure they match. If, for instance, your Node.js version is 20, your node-sass version is 9, but your sass-loader version is 7, you will encounter an error. In this case, you need to first ensure that the versions match and align each of the versions.

I hope this explanation will help someone who is searching for a solution.