Windows-Build-Tools

On Windows? Want to compile native Node modules? Install the build tools with this one-liner:

npm install --global --production windows-build-tools

After installation, npm will automatically execute this module, which downloads and installs Visual
C++ Build Tools, provided free of charge by Microsoft. These tools are required to compile popular native modules.
It will also install Python 2.7, configuring your machine and npm appropriately.

Both installations are conflict-free, meaning that they do not mess with existing installations of
Visual Studio, C++ Build Tools, or Python. If you see anything that indiciates otherwise, please
file a bug.

Visual Studio 2017 vs Visual Studio 2015

This module is capable of installing either the build tools from Visual Studio 2017 or Visual
Studio 2015. Since Node's underlying build tools still don't fully support 2017, you might
have a better experience with 2015 - even if it sounds a bit outdated. On the other hand, if
you are only trying to compile a certain set of modules, the 2017 build tools are smaller and
install a bit quicker.

By default, this tool will install the 2015 build tools. To change that, run this script with
the --vs2017 parameter.

Visual Studio 2017 Parameters

Support & Help

This package currently only handles the most common use case, none of the edge cases. If you encounter errors, we'd greatly appreciate error reports (and even pull requests). This is currently tested on Windows 10.

Where is Python installed?

It's saved under %USERPROFILE%\.windows-build-tools\python27.

'Python' is not recognized as a command

To not mess with your machine in unnecessary ways, Python is only installed to disk and configured
with npm. If you'd like for the python command to work in cmd.exe and PowerShell, add the
folder %USERPROFILE%\.windows-build-tools\python27 to your environment variables.

License & Credits

The Python installation was made possible by Ali Hajimirza, who kindly wrestled with Python's MSIs until they surrendered.