Visual Studio External Web Tools Configuration

August 28, 2018

In working with several npm tools you occasionally run into some weird issues when running scripts from within the Visual Studio, perhaps using the task runner (running gulp files for example). On a couple different machines I saw an error relating to node-sass like this:

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

This led me down a rabbit hole doing things like installing python versions to try to get the npm rebuild node-sass --force command to work. The simple thing that I’ve found to alleviate some of this pain is to update the external web tools settings in Visual Studio to ensure that your system $(PATH) variable is above the ${VSINSTALLDIR)\Web\External directory.

Setting your PATH system variable in a higher position than the Visual Studio tools folder will ensure that your node.js environment is tried first which usually provides the best results.