Fix Node Sass Unsupported runtime Error
Running into errors while developing a project is a significant hassle, and nothing is more annoying than fixing errors in your build pipeline. These errors creep in over time, whether you’re using gulp, webpack, grunt, or anything else. Below we will look at how to fix the Node Sass unsupported runtime error.
You go to run the build pipeline for your project, and suddenly, you see this error.
Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (83)
Everything worked fine before, so what changed, and why do we see this error?
The error above means that your currently installed Node version and the version of the node-sass package in your node_modules folder are mismatched and not compatible. At some point, you may have updated your Node version, and now some of your installed packages may not jive.
The solution here is simple. Run the following command:
npm rebuild node-sass
This command will recompile all your node-sass plugins with the new Node binary.
This command may take some time, so let it run, and node-sass should be fixed.
Alternatively, you can remove node-sass entirely and reinstall it with the following command:
npm uninstall node-sass && npm install node-sass
Lastly, you can delete your entire node_modules folder and run npm install to reinstall it all again.
Remember, if you are going to be upgrading your Node version in your development environment, it’s always a good idea to use a package such as NVM to maintain proper version control. NVM will allow you to install and then switch between different Node versions easily. You always want to keep your development environment mirrored as closely as possible to your production environment. At the same time, you want the ability to try out new Node versions to take advantage of newly added features.
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.