The Error: node sass does not yet support your current environment occurs in Python when you try to compile a Sass file using the node-sass library, and the version of node-sass you have installed is not compatible with the version of Node.js you are using.
To fix the Error: node sass does not yet support your current environment, upgrade or downgrade Node.js to a version supported by node-sass. If the node.js version is supported, you can use this command: npm rebuild node-sass.
If that doesn’t work, you can use the below command to fix the issue from the ground up.
npm uninstall node-sass && npm install node-sass
The issue is resolved by uninstalling and reinstalling.
However, you might need to indicate the version being installed while doing the installation. For instance, npm install node-sass@8.0.0 installs the most recent version before 5.0 to prevent the issue.
You can check the supported Node.js versions for the version of node-sass you have installed by referring to its documentation.
The alternate solution is to remove the node_modules folder and use the yarn install command which rebuilt the node-sass library.
Conclusion
You can follow the below steps to fix the Error: node sass does not yet support your current environment.
- nvm install 18.14.0 (downgrade node to the version that satisfies node-sass)
- nvm use 18.14.0
- npm install node-sass@8.0.0 (reinstall node-sass)
- npm rebuild node-sass
- npm start
If you want a simple solution to fix the error, use this command: npm uninstall node-sass && npm install node-sass.
That’s it.