34

So I am trying to compile gyp and it wants to call VCBuild.exe apparently...

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [C:\...\node_module
s\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\no
de_modules\utf-8-validate\build\binding.sln]

So I install the .Net framework using this but when I go to the cmd line I get...

'VCBuild.exe' is not recognized as an internal or external command,
operable program or batch file.

so what am I missing what do I need to get VCBuild without Visual Studio?

Jackie
  • 837
  • 2
  • 12
  • 20

5 Answers5

66

npm install -g windows-build-tools

ran in an administration window:

Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Waiting for installers... -Successfully installed Python 2.7
Waiting for installers... /Successfully installed Visual Studio Build Tools.
bertieb
  • 7,543
5

(This answer comes from comments above from @s.meijer. But I think it deserves to be an answer by its own.)

Run choco install vcbuildtools will install vcbuild that satisfies npm build needs on Windows.

2

I'm just posting this in case it saves anyone some time.

I tried all the answers I could find regarding this issue and they didn't work, ie:

// running powershell as administrator  
npm install --global --production windows-build-tools 

choco install vcbuildtools

The only thing that made "VCBuild.exe" errors go away was installing:

NET Framework 2.0 Software Development Kit (SDK) 

The installation was a bit weird, I ran the .exe file and nothing seemed to happen but, judging by the fact that the install error messages went away, apparently it worked and was installed.

0

Looks like the answer was staring me in the face... You can't :-(

I found the steps to compile on the node-gyp Readme.md

It does in fact require VS2015 for Windows which sucks because

enter image description here

Jackie
  • 837
  • 2
  • 12
  • 20
0

I got this error when I was trying to run an AngularJs application (requiring Node.js 6x) in an Node.js 12x env. Downgrading my version of Node.js made this go away. TIP: If you need to flip between Node versions, look at http://nvm.sh