Installations
npm install windows-build-tools
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=8.0.0
Node Version
10.16.0
NPM Version
6.9.0
Score
73.3
Supply Chain
91.6
Quality
70.4
Maintenance
50
Vulnerability
95.9
License
Releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (89.05%)
PowerShell (7.02%)
JavaScript (3.93%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
felixrieseberg
Download Statistics
Total Downloads
5,192,563
Last Day
1,497
Last Week
8,976
Last Month
36,483
Last Year
378,801
GitHub Statistics
MIT License
3,406 Stars
328 Commits
238 Forks
77 Watchers
4 Branches
24 Contributors
Updated on Feb 11, 2025
Package Meta Information
Latest Version
5.2.2
Package Id
windows-build-tools@5.2.2
Size
24.87 kB
NPM Version
6.9.0
Node Version
10.16.0
Published on
Jul 13, 2019
Total Downloads
Cumulative downloads
Total Downloads
5,192,563
Last Day
-2.3%
1,497
Compared to previous day
Last Week
-1.1%
8,976
Compared to previous week
Last Month
37.6%
36,483
Compared to previous month
Last Year
-17.6%
378,801
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Windows-Build-Tools
On Windows? Want to compile native Node modules? Install the build tools with this one-liner. Start PowerShell as Administrator and run:
npm install --global windows-build-tools
Or, if you are using Yarn:
yarn global add windows-build-tools
After installation, npm will automatically execute this module, which downloads and installs Visual C++ Build Tools, provided free of charge for most users by Microsoft (as part of Visual Studio Community, please consult the license to determine whether or not you're eligible). These tools are required to compile popular native modules. If not already installed, it will also install Python 2.7, configuring your machine and npm appropriately.
:bulb: [Windows Vista / 7 only] requires .NET Framework 4.5.1 (Currently not installed automatically by this package)
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 indicates 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.
By default, this tool will install the 2017 build tools. To change that, run this script with
the --vs2015
parameter.
Usage
npm [--python-mirror=''] [--proxy=''] [--debug] [--strict-ssl] [--resume] [--sockets=5] [--vcc-build-tools-parameters=''] [--vs2015] [--dry-run-only] install --global windows-build-tools
Optional arguments:
--offline-installers
: Path to a folder with already downloaded installers. See--python-mirror
: Use a given mirror to download Python (like--python_mirror=https://npm.taobao.org/mirrors/python/
). You can alternatively set aPYTHON_MIRROR
environment variable.--proxy
: Use a given proxy. You can alternatively set aPROXY
environment variable.--debug
: Be extra verbose in the logger output. Equal to setting the environment variableDEBUG
to*
.--strict-ssl
: Enables "Strict SSL" mode. Defaults to false.--resume
: By default,windows-build-tools
will resume aborted downloads. Set tofalse
to disable.--sockets
: Specifies the number of http sockets to use at once (this controls concurrency). Defaults to infinity.--vcc-build-tools-parameters
: Specifies additional parameters for the Visual C++ Build Tools 2015. See below for more detailed usage instructions.--silent
: The script will not output any information.--vs2015
: Install the Visual Studio 2015 Build Tools instead of the Visual Studio 2017 ones.--dry-run-only
: Don't actually do anything, just print what the script would have done.--include-arm64-tools
: Include the optional Visual Studio components required to build binaries for ARM64 Windows. Only available with the 2017 and newer build tools and Node.js v12 and up.
Supplying Parameters to the VCC Build Tools
You can pass additional parameters directly to the VCC Build Tools installer. This tool does not check if the parameters make sense - passing incorrect parameters might break the whole installation.
Supply parameters to windows-build-tools
as a JSON array. Here's quick example (note the double quotes):
npm --vcc-build-tools-parameters='[""--allWorkloads""]' install --global windows-build-tools
Visual Studio 2015 Parameters
If you run windows-build-tools
with --vs2015
, these parameters are available:
/AdminFile
:Specifies the installation control file. /CreateAdminFile
:Specifies the location to create a control file that can then be used /CustomInstallPath
:Set Custom install location. /ForceRestart
: Always restart the system after installation./Full
: Install all product features./InstallSelectableItems
: <item1;item2;...;itemN> Choose which selectable item(s) to be installed. -selectable item to be installed, just pass in this switch without any value./Layout
: Create a copy of the media in specified folder./NoRefresh
: Prevent setup checking for updates from the internet./NoRestart
: Do not restart during or after installation./NoWeb
: Prevent setup downloading from the internet./Passive
: Display progress but do not wait for user input./ProductKey
: <25-character product key> Set custom product key (no dashes)./PromptRestart
: Prompt the user before restarting the system./Repair
: Repair the product./Uninstall
: Uninstall the product./Uninstall /Force
: Uninstall the product and features shared with other products.
Visual Studio 2017 Parameters
The available parameters are documented here.
Offline Installation
By default, windows-build-tools
will download the latest installers from Microsoft each time
it's installed. Alternatively, you can prepare a folder that contains installers. They need to
have their original names:
- Visual Studio Build Tools:
vs_BuildTools.exe
orBuildTools_Full.exe
- Python:
python-2.7.15.amd64.msi
orpython-2.7.15.msi
Then, run windows-build-tools
with the --offline-installers
argument:
1npm install -g windows-build-tools --offline-installers="C:\Users\John\installers"
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.
Node versions
windows-build-tools
4.0 and up require at least Node v8.windows-build-tools
3.0 and up require at least Node v6.windows-build-tools
1.0 and up require at least Node v4.
Where is Python installed?
It's saved under %USERPROFILE%\.windows-build-tools\python27
.
Installing as a Non-Administrator
windows-build-tools
works best if installed from an account with administrative rights. However,
thanks to @brucejo75, the following steps can be taken to install to a different user account:
- From your non-admin account (e.g. <Me>) run
cmd.exe
as administrator. - Set the following environment variables in the new command shell:
set APPDATA=C:\Users\<Me>\AppData\Roaming
npm config set prefix C:\Users\<Me>\AppData\Roaming\npm
set USERNAME=<Me>
set USERPROFILE=C:\Users\<Me>
Ensure that the variables passed match your location of npm's roaming data and the location
of user profiles on your machine. For <me>
, substitute the name of the account you want to
install windows-build-tools
for. For more information, see the npm config set prefix
description here.
- Run
npm install -g windows-build-tools
Examples of Modules Supported
In theory, windows-build-tools
supports all pure C++ addons for Node.js (and virtually everything
else that requires a native compiler toolchain to be installed on your machine).
To ensure that that's true, we take a fresh Windows 10 installation, add windows-build-tools
, and
ensure that the most popular native Node addons compile from source. Those are: node-sass, bcrypt, sqlite3, serialport, websocket, deasync, grpc, canvas, sharp,
hiredis, leveldown, nodegit, zqm, ffi, libxmljs, iconv, ref, sleep, microtime, couchbase, bignum,
kerberos, and ursa.
License & Credits
The Python installation was made possible by Ali Hajimirza, who kindly wrestled with Python's MSIs until they surrendered. For details regarding the license agreements applicable to Python, see History and License 2.x and 3.x.
Use of Microsoft software is subject to the terms of the corresponding license agreements. For details regarding the license agreements applicable to Visual Studio products, refer to their License Directory page. (See also this discussion for the gist of it.)
Copyright (C) 2018 Felix Rieseberg. Licensed MIT. For more details, please see LICENSE. This license applies to this package only, not to its dependencies or the 3rd party software that it installs.
Stable Version
Stable Version
5.2.2
High
1
8.1/10
Summary
windows-build-tools downloads Resources over HTTP
Affected Versions
< 1.0.0
Patched Versions
1.0.0
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 3/5 approved changesets -- score normalized to 6
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 29 are checked with a SAST tool
Reason
24 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
2.5
/10
Last Scanned on 2025-02-17
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to windows-build-tools
@aminya/windows-build-tools
Install C++ Build Tools for Windows using npm
@gnu-mcu-eclipse/windows-build-tools
An xPack that installs the binary files for GNU MCU Eclipse Windows Build Tools.
@xpack-dev-tools/windows-build-tools
A binary xPack with the Windows Build Tools executables.
@tremho/jove-cli
tbx command line utility for Jove development