Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe"

Tags:

I am trying to install nodejs from a long time now. I tried it searching over the google but seriously i had not got any working solutions.

My first question is that

  1. Why Nodejs require Microsoft Visual component?

Secondly as per suggestion on google i tried below things

  • Installed Visual C++ 2010 (updated path in the variable) but after installing i got many more errors including "MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
  • Went through https://github.com/TooTallNate/node-gyp for getting errors removed but still it is not working.
  • Uninstalled and installed Node js again but with no success.

I have following versions as

  • Node js 0.12
  • Python 2.7
  • Ruby 1.9.3
  • Windows 7 64 bit.

When i run npm-install then the error appears as below

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 Visual Studio 2005 or 3) add the location of the 
component to the system path if it is installed elsewhere. 

My package.json is as below:

{
 "name": "TRest",
 "version": "0.1.0",
 "devDependencies": {
     "grunt": "~0.4.2",
     "grunt-contrib-watch": "~0.5.3",
     "grunt-sass": "~0.11.0",
     "grunt-pixrem": "^0.1.2",
     "grunt-legacssy": "^0.2.0",
     "grunt-contrib-concat": "~0.3.0",
     "grunt-contrib-uglify": "~0.3.2",
     "node-bourbon": "^1.0.0"
  }
}
like image 554
Gags Avatar asked Feb 20 '15 05:02

Gags


People also ask

Where is Vcbuild EXE located?

Once installed, your vcbuild.exe should be located somewhere in the subfolders of C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin (mine was in amd64).


2 Answers

You can tell npm to use Visual studio 2010 by doing this...

npm install socket.io --msvs_version=2010

Replace socket.io with the package that is giving the issue.

It is also possible to set the global settings for npm:

npm config set msvs_version 2010 --global
like image 80
Bertus Kruger Avatar answered Sep 22 '22 00:09

Bertus Kruger


alternatively try npm install --global --production windows-build-tools

like image 45
Badr Bellaj Avatar answered Sep 25 '22 00:09

Badr Bellaj