-
Notifications
You must be signed in to change notification settings - Fork 465
Node Modules builds on Windows (bcrypt, node sass, etc)
In order to build some of NodeJS modules, you need to have Windows Build Tools installed on Windows OS.
There are two ways how to do it (select one or another):
npm install --global --production windows-build-tools
- Install Choco and run
choco install visualcpp-build-tools --version=15.0.26228.20170424 --force --upgrade
(previous versions was possible to install using https://chocolatey.org/packages/visualcpp-build-tools/14.0.25420.1)
Next, you may need to add VCTargetsPath environment variable with value C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140
(for older builds) or C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets
for new builds using VS 2017 toolset
It is also possible to set VS140COMNTOOLS (e.g. to C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools
)
See more information: https://github.com/nodejs/node-gyp#on-windows
Important Note: do NOT forget to close the console and open it again after you installed build tools because it set env vars which apply only after console restart!