Node Sass could not find a binding for your current environment
If you use Sass in your Aurelia project, or any other web project for that matter, and run in to the error that Node Sass is missing a binding for your current environment.
Then you most likely recently did a
npm install/update or a
If it’s the case that you just upgraded the node-sass package, the solution is often to simply rebuild node-sass.
Rebuild node-sass by entering the following in a CLI, positioned in the root of your web project, enter:
npm rebuild node-sass
Rebuild instructions in the Error
The solution is actually right there in the error message, however it’s easy to miss 🙁
The full error you get from building looks like this, but with “WebApp” replaced by the full path to your web app root.
WebApp\node_modules\node-sass\lib\index.js:15 throw new Error(errors.missingBinary()); ^ Error: Missing binding WebApp\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: - 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 Object.<anonymous> (WebApp\node_modules\node-sass\lib\index.js:15:11) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (WebApp\node_modules\gulp-sass\index.js:187:21) at Module._compile (module.js:556:32)
Happy Coding! 🙂