Node Sass does not yet support your current environment error normally happens when the node version is updated globally and the necessary update of dependencies on the project level is not done. Maybe you already get this error when compiling sass files. In my case it’s regularly when I updated my node version or switch versions due to having multiple installed versions.
Flee the Obvious
Do not rush into trying the most obvious solution of removing the node_modules folder and running npm install. Do not downgrade your node version either just to get it back to the level it was before the update of node, even though this method would mostly work. Since it is just like returning to the working setup before the update. This method would not be very useful in cases where actually need to upgrade your node version.
There is a better way
What I can not explain is why this error is generated in the first place when node version is updated, but what I did was to rebuild my node-sass, this reconfigures the runtime environment to be compatible with the currently installed node version. Rebuild node-sass by running the following command in the terminal
npm rebuild node-sass
or
sudo npm rebuild node-sass
This should not take too long to complete, but if it does just allow the time to pass whiles the correction is done. The image bellow details the result.
That should do it. Happy coding
No Comments
Leave a comment Cancel