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
  • 817
  • 2
  • 11
  • 19

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,344
  • 36
  • 42
  • 54
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.

Penghe Geng
  • 243
  • 4
  • 10
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.

user1063287
  • 149
  • 4
  • 1
    Not sure if this really helped, but I'm going to vote up. Seems like `windows-build-tools` didn't fully help, and the .NET 2.0 SDK is silent (no UI) which is confusing. After 2-3 minutes, the rebuilding worked. – misha Jul 22 '19 at 06:11
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
  • 817
  • 2
  • 11
  • 19
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

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 04 '22 at 08:59