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
Worked for me:
Just delete the node-sass folder and run npm install
.
The post dependencies for node-sass is not getting installed without the package.json inside node-sass
Running it manually solved for me
node node_modules/node-sass/scripts/install.js
credit: link
None of the install/rebuild solutions resolved the issue for me (using gulp).
Here is how I resolved it:
1) Download the missing binding file from the repository.
2) Rename the file binding.node
.
3) Create node_modules/node-sass/vendor/darwin-x64-11
(path from error message) directory if it doesn't exist.
4) Add the binding file to node_modules/node-sass/vendor/darwin-x64-11
npm rebuild node-sass --force
Or, if you are using node-sass within a container:
docker exec <container-id> npm rebuild node-sass --force
This error occurs when node-sass does not have the correct binding for the current operating system.
If you use Docker, this error usually happens when you add node_modules
directly to the container filesystem in your Dockerfile (or mount them using a Docker volume).
The container architecture is probably different than your current operating system. For example, I installed node-sass on macOS but my container runs Ubuntu.
If you force node-sass to rebuild from within the container, node-sass will download the correct bindings for the container operating system.
See my repro case to learn more.
in some cases you need to uninstall and install node-sass library. Try:
npm uninstall --save node-sass
and
npm install --save node-sass
look at this its work for me, Stack link here
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.