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/node_modules/node-sass/vendor/darwin-x64-11/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node 0.10.x
I have tried running
npm rebuild node-sass
which says
Binary is fine; exiting.
When running node -v
I get v6.2.2
Which is different to what the sass error says "Node 0.10.x". I cant figure out why it is getting the wrong version. I have also tried removing the node_modules folder and running npm update or npm install, both of which did not resolve the issue. Any ideas?
Note I'm using VS 2015, 64-bit Windows 7.
Also works for VS 2017 (from replies to this post)
Task Runner Explorer can't load tasks
For VS 2015
For VS 2017(.3)
Deleting
node_modules
and runningnpm install
and thennpm rebuild node-sass
did nothing.This worked for me Deleting
node_modules
and then restoring packages from IDE and thennpm rebuild node-sass
For people that switched to nvm from system node, if you haven't removed the
~/.npm
and~/.node-gyp
folder this problem can arise since perhaps the node version within~/.node-gyp
could be different.In any case those folders should be removed.
I had the same problem
That was because I did npm install using a different nodejs version, try deleting node_modules folder installing and starting
If you are using nvm do
I had to first choose the new default node version
nvm use ***
ornvm install ***
and then remove all in node_modules in the project andnpm i
again.For Visual Studio 2015/2017, Right Click on your
package.json
and Click on Restore Packages.This will make sure that the npm from the Visual Studio Tools External Tools is run and the binding will be rebuild based on that.