Node Sass could not find a binding for your current environment

Node Sass could not find a binding for your current environment

This tutorial guides you on how to fix error Node Sass could not find a binding for your current environment while building an node application.

Node Sass could not find a binding for your current environment

Node Sass could not find a binding for your current environment

After downloading the reference code from the Github I was trying to run npm install and got the below node-saas issues.

[10:14:55] Requiring external module babel-register
Error: Missing binding C:\Users34\Documents\frontend\node_modules\node-sass\vendor\win32-x64-48\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x

Found bindings for the following environments:
- Linux 64-bit with Node.js 6.x

Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x

From the above error it is clear that in your environment node could not find a binding for your Operating System environment. and it requires Windows  binding.node.

Solution to fix node-saas binding issue

Node-saas is a library that provides binding for Node.js to LibSaas. And it allows you to natively compile .scss files to css very fast. Let’s see how to fix node-saas dependency issue in your environment.

When I faced the above error in my development setup after running npm install, I ran the following commands. And that solved my node-saas binding issue. I am not sure if you have a similar problem as that of mine. But you can give a try by running these commands.

Set the proxy config

> npm config set proxy https://github.com

After setting proxy config, now try running the following node command.

> node node_modules/node-sass/scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-48_binding.node
Download complete
Binary saved to C:\Users34\Documents\frontend\node_modules\node-sass\vendor\win32-x64-48\binding.node

The above node command with install.js script will download the required node-saas binary that suits your environment. After that, it will save the downloaded file under node_modules.

Finally, after installing the win32-x64-48 binding.node the error Node Sass could not find a binding for your current environment has gone away.

Hope it is helpful 🙂

Also see:

References:

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments