问题
I get following error message when running gulp
:
Error: Missing binding Z:\Themewagon\Premium\sparrow\zcore\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 7.x
To resolve this error I tried:
- npm install node-sass,
- npm rebuild node-sass,
- npm uninstall -save node-sass,
- npm install -save node-sass,
- npm cache clean. etc
Nothing is working for me. How do I resolve this issue.
回答1:
This happens when you have 2 versions of Node installed, add node-sass with one and run it for the other.
Example Visual Studio ships with Node 5 (at least VS2017 does). If you have installed another version of node (say v6) and install node-sass using that. When it installs it binds to the version to version 6. You can then never run gulp via Visual studio (under Node 5) it fails with the error.
To fix this you can make visual studio use the version you have installed on your system. Add the entry to top of the list to your node location:
来源:https://stackoverflow.com/questions/40904101/node-sass-could-not-find-a-binding-for-your-current-environment-windows-64-bit