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?
Please also remember to rename the xxx.node file ( in my case win32-x64-51) to binding.node and paste in the xxx folder ( in my case win32-x64-51),
When building a docker image and attempting to run it locally I ran into this same issue. You need to add a .dockerignore file with the following:
.DS_Store .git .gitignore .idea log/* target tmp node_modules client/node_modules spec/internal/public/assets public/assets
This usually happens because the environment has changed since running
npm install
. Runningnpm rebuild node-sass
builds the binding for the current environment.Answer by @core114 suggesting Uninstalling & installing
sass
package again works fine for manual process but for automated deployment/CI/CD you need more generic approach. What worked for me is for Continuos deployment of different environment is :removing old
node_modules
usingrimraf
before deploymentrimraf node_modules
Updating
sass
package in npmpackage.json
& committing to source control.For next deployment it will automatically refresh sass for all environment.
Worked for me:
Just delete the node-sass folder and run npm install.
The problem for me was that the Task Runner Explorer was targeting the solution of my project. When I changed to the project itself using the drop-down list, next to the Task Runner Explorer refresh button, it showed the relevant tasks.