Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x

Recently I was opening a Angular2 application that was using the WebPack Sass loader to bundle the Sass files. Conveniently Visual Studio performs “npm install” to load all the npm packages.

When running “npm start” I got the following error:

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 32-bit with Node.js 5.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.

Somehow Visual Studio installed the wrong binaries for node-sass. The fix was quite simply – just run “npm rebuild node-sass” as stated in the error message.

Did anyone else experience the same behaviour?

Bower install / NPM install behind a proxy

Often when you work in a company network your are using a proxy to connect to the internet and it is not uncommon that you receive the following error when trying to execute bower install or npm install

ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/jquery/jquery.git", exit code of #128

The proxy is blocking the connection to Github because most proxy do not allow git://-urls. The solution for this is very simple. Just change the git urls to https and everything will work. This command changes all github urls to https:

git config --global url.https://github.com/.insteadOf git://github.com/

Error: ENOENT, stat ‘C:\Users\Username\AppData\Roamin\npm’

Today I installed Node.js on a new Windows 8.1 machine. I downloaded the latest version from nodejs.org and tried to use npm. I got the following exception:

Error: ENOENT, stat 'C:\Users\Username\AppData\Roamin\npm'

The solution is very simple: Just create the folder: C:\Users\Username\AppData\Roamin\npm Afterwards node (and npm) works as expected.

This behavior is a bug in the recent version of the node installer (see here for more details).