I am having issues building an app because node-sass keeps failing with the error.
ERROR in Missing binding /Users/warren/Sites/random-docs/my-cms/nod
This happens when in your workstation you run an update of Node.js and you are using node-sass globally.
So you should uninstall node-sass globally
npm uninstall -g node-sass
And then you have to install it globally, again
npm install -g node-sass
A similar error I encountered with Visual Studio 2015 Community Edition while having created an AspNetCore app was:
Node Sass could not find a binding for your current environment: Windows 32-bit with Node.js 5.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 6.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
at module.exports ([..]\node_modules\node-sass\lib\binding.js:15:13)
at Object.<anonymous> ([..]\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> ([..]\node_modules\gulp-sass\index.js:187:21)
at Module._compile (module.js:397:26)
You can see the from the error above that the cause was from a version mismatch on the bindings for nodejs.
Node Sass could not find a binding for your current environment: Windows 32-bit with Node.js 5.x
Found bindings for the following environments: - Windows 64-bit with Node.js 6.x
The solution I found was to
Open Visual Studio 2017
Go to Tools -> Options…
Go to Projects and Solutions -> Web Package Management
Move $(PATH) to the top of that list and close that window.
Restart Visual Studio.
This worked in my case, because my node version is 11.x
I'm a Windows 8 user, recently updated Node to v8.11.1
and npm to v6.0.0
and faced similar issue. Nothing worked - npm install -g node-sass@latest
or deleting the node-sass
directory from the project node_modules/
- none of 'em worked for me.
The Laravel Mix was throwing an error to my browser console saying a missing node: win32-x64-57
. I don't know whether it's because a slower internet connection or something, the node was missing during the update.
Hence some of the answers directed me to look at the Node-Sass releases, and I found the solution.
npm view node-sass version
(the {your version}
in step 4)C:\Users\{User}\AppData\Roaming\npm-cache\node-sass\{your version}\
and put the downloaded .node
file inside the version folderAnd you are done.
In my case the node-sass version was 4.9.0
and the missing node was win32-x64-57_binding.node
, so I downloaded the .node
file from 4.9.0 release and followed step 4.
I had this issue when upgrading from VS 2017 Professional to Enterprise
I had the same issue. I couldn't find any proper working solution in here, so I found mine:
Inspired by @Rob-Scott solution and other pointing that we could have 2 versions of Node.js installed, I went to C:\Program Files (x86)\nodejs
and realized that I had a node.js version installed in addition to the VS default installation.
My solution was quite simple:
add an entry
(most left of the top-right block of buttons)C:\Program Files (x86)\nodejs
, validate by pressing enter
Probably Node.js is not set well in the PATH variable, but this is my working very quick solution, my 2 cents :)