Another approach to fix the “Node Sass does not yet support your current environment” error would be to downgrade your Node back to the version it was when node-sass worked. You could use the nvm use [node version] command to achieve this.
Warning: LibSass and Node Sass are deprecated. While they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass.
run npm rebuild node-sass
or
run sudo npm rebuild node-sass
in some cases you need to uninstall and install node-sass library. Try:
npm uninstall --save-dev node-sass
and
npm install --save-dev node-sass
I managed to solve this issue using the command below.
npm audit fix - Worked for me
npm audit fix
I tried - Didn't work for me
sudo npm rebuild node-sass
Then I tried - Didn't work for me
npm uninstall --save-dev node-sass
and
npm install --save-dev node-sass
As of July 2019 with Node v12 -
node-sass v4.11.0 doesn't work with Node 12.
I faced this problem when I upgraded node to v12.
Rebuilding node-sass as suggested by the other answers didn't work as well.
Upgrading node-sass to v4.12.0 fixed it for me.
npm install [email protected]
Uninstall and reinstall node-sass
and it will find missing binary for itself.
npm uninstall --save-dev node-sass
npm install --save-dev node-sass
If issue is not resolved using above commands, there may be problem with your node version. Check that your node version supports node-sass version. Chose a stable node version and repeat above commands to fix this issue.
Below is compatibility table of node with node-sass:-
NodeJS | Supported node-sass version | Node Module
Node 16 6.0+ 93
Node 15 5.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
If issue is still not fixed, check node-sass supported environment's list:- https://github.com/sass/node-sass/releases/
You should also check your version of nodejs. I was on a version 9 of node js which isn't officially supported at this time of writing. Reverting back to version 6.11.4 fixed the issue for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With