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
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:
- Call ngOnInit() again from another function – Angular 9 ?
- ngOnChanges get new value and previous value – Angular
- Global Angular CLI version is greater than your local version
- Upgrade Angular CLI to the latest version Angular 9 or 10 ?
- How to use new static option in ViewChild Angular 9 ?
- Project contents into angular components using ng-content
- Call ngOnInit() again from another function – Angular 9 ?
- Make npm install command to work behind proxy ?
- ngAfterViewInit with Example – Angular
- ngAfterContentChecked with Example
- ngOnDestroy Example Angular
- Angular Component : In which lifecycle hook you can check value of DOM element ?
- @ContentChild TypeError: Cannot read property ‘nativeElement’ of undefined
- Access ng-content with @ContentChild – Angular Component
- How to select an element in a component template – Angular ?
- Difference between @ViewChild and @ContentChild – Angular Example
- Expected 0 type arguments, but got 1 : Angular
- Angular – Access template reference variables from component class ?
- Pass variable from parent to custom child component – Angular 9
- Cannot find name ‘Output’ – Angular
- EventEmitter parameter value undefined for listener
- Typescript Error: Property does not exist on value of type
- Remove http and https proxy settings of npm and git ?