npm install error - MSB3428: Could not load the Visual C++ component "VCBuild.exe"

Solution 1:

Try this from cmd line as Administrator

optional part, if you need to use a proxy:

set HTTP_PROXY=http://login:password@your-proxy-host:your-proxy-port
set HTTPS_PROXY=http://login:password@your-proxy-host:your-proxy-port

run this:

npm install -g --production windows-build-tools

No need for Visual Studio. This has what you need.

References:

https://www.npmjs.com/package/windows-build-tools
https://github.com/felixrieseberg/windows-build-tools

Solution 2:

I know it's a very old question, but is the first in my google search and after some time I got how to solve this.

find node on your windows with:
as @janaka-bandara suggested you can use the native
where node
if you don't have it for some reason you can install which with node
$ npm install -g which
$ which node
after cd into the directory, inside the directory cd into node_modules\npm folder and finally:
$ npm install node-gyp@latest
here worked, the answer is from this site