New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Hao-Wu opened this Issue Aug 13, 2013 · 67 comments

Comments

Projects
None yet
@Hao-Wu

Hao-Wu commented Aug 13, 2013

This occurs when I am trying to build jquery mobile. However, I can still build it successfully with the error. Please see logs for reference.

E:\GitHub\jquery-mobile>npm install
npm http GET https://registry.npmjs.org/jquery
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/grunt-qunit-junit
npm http 304 https://registry.npmjs.org/jquery
npm http 304 https://registry.npmjs.org/grunt-qunit-junit
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/location/0.0.1
npm http GET https://registry.npmjs.org/htmlparser/1.7.6
npm http GET https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/navigator
npm http GET https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/htmlparser/1.7.6
npm http 304 https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/location/0.0.1
npm http 304 https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/navigator
npm http 304 https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/cssstyle
npm http 304 https://registry.npmjs.org/bindings

> contextify@0.1.6 install E:\GitHub\jquery-mobile\node_modules\jquery\node_modu
les\contextify
> node-gyp rebuild


E:\GitHub\jquery-mobile\node_modules\jquery\node_modules\contextify>node "D:\nod
ejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.
js" rebuild
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/cssstyle
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/cookie-jar
npm http GET https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/cookie-jar
npm http 304 https://registry.npmjs.org/aws-sign
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
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.  [E:\GitHub\jquery-mobile\node_modules\jquery\node_modu
les\contextify\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "D:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\GitHub\jquery-mobile\node_modules\jquery\node_modules\contextify

gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! Error: ENOENT, open 'E:\GitHub\jquery-mobile\node_modules\jquery\node_m
odules\jsdom\node_modules\cssstyle\lib\properties\borderLeftStyle.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\\nodejs\\\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\n
pm-cli.js" "install"
npm ERR! cwd E:\GitHub\jquery-mobile
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path E:\GitHub\jquery-mobile\node_modules\jquery\node_modules\jsdom\nod
e_modules\cssstyle\lib\properties\borderLeftStyle.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! weird error 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     E:\GitHub\jquery-mobile\npm-debug.log
npm ERR! not ok code 0
@chinmayrane

This comment has been minimized.

chinmayrane commented Dec 3, 2013

Were yo able to close this?

@JayBeavers

This comment has been minimized.

Contributor

JayBeavers commented Dec 6, 2013

Do you have Visual Studio with a C++ compiler installed?

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

basically says "you don't have a c++ compiler installed'. You can install Visual Studio with just Visual Basic or C# so you can see this error even when VS is installed.

I would suggest installing Visual Studio Express 2013 for Windows Desktop. This comes with the C++ compiler by default.

@k-j-kleist

This comment has been minimized.

k-j-kleist commented Dec 20, 2013

I get a similar error when trying "npm install msgpack":

PS C:\projects\klarna-test> npm install msgpack
npm WARN package.json klarna-test@0.0.0 No description
npm WARN package.json klarna-test@0.0.0 No repository field.
npm WARN package.json klarna-test@0.0.0 No README data
npm http GET https://registry.npmjs.org/msgpack
npm http 200 https://registry.npmjs.org/msgpack

> msgpack@0.2.1 install C:\projects\klarna-test\node_modules\msgpack
> node-gyp rebuild


C:\projects\klarna-test\node_modules\msgpack>node "C:\local\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installe
d, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Mic
rosoft Visual Studio 2008.  [C:\projects\klarna-test\node_modules\msgpack\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\local\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\local\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\projects\klarna-test\node_modules\msgpack
gyp ERR! node -v v0.10.20
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

Windows 7 / 64 bit, I do have installed "Microsoft Windows SDK for Windows Server 2008" as well as Visual Studio 2013.

@chinmayrane

This comment has been minimized.

chinmayrane commented Dec 20, 2013

Had to install Microsoft Visual Studio Express. Essentially now I have to install Python and Visual Studio for running Node modules just because am a Windows user. Where is Ryan?

@k-j-kleist

This comment has been minimized.

k-j-kleist commented Dec 20, 2013

Although I installed "Microsoft Windows SDK for Windows Server 2008", node-gyp is using "C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" which is part of Visual Studio 2013.

http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx

Sigh...

@k-j-kleist

This comment has been minimized.

k-j-kleist commented Dec 20, 2013

Giving up on this as for now! According to #343 support for Visual Studio 2013 is in work, so I'll be patient rather than waste time trying to find out why node-gyp pukes on me.

@chinmayrane

This comment has been minimized.

chinmayrane commented Dec 20, 2013

Are you getting the same error again, I installed Visual Studio 2010 Express Edition and viola, the errors went for me! Is it the Python error or the MSBuild.exe Error?

@k-j-kleist

This comment has been minimized.

k-j-kleist commented Dec 20, 2013

Microsoft recommends installing VS 2010 before VS 2013. No way that I'll uninstall 2013, install 2010, then reinstall 2013...

Will do development on Linux for this time.

@chinmayrane

This comment has been minimized.

chinmayrane commented Dec 20, 2013

Hahah. Windows is as Important as PHP. :P

@Hao-Wu Hao-Wu closed this Mar 24, 2015

@knightuniverse

This comment has been minimized.

knightuniverse commented Mar 27, 2015

I met the same problem, and I already have VS 2013 Express installed. No way I'll reinstall 2013. I hate windows.

@joshbedo

This comment has been minimized.

joshbedo commented Jul 1, 2015

+1 to hating windows, i can't get this to work even after installed visual studio 2015 express.

@Hao-Wu

This comment has been minimized.

Hao-Wu commented Jul 2, 2015

I closed this issue because I left Windows and switched to Mac OS X as my development env.

Since the issue still exists per above comments, re-open this issue.

@Hao-Wu Hao-Wu reopened this Jul 2, 2015

@joshbedo

This comment has been minimized.

joshbedo commented Jul 2, 2015

@Hao-Wu Yeah i typically use my Mac but the hard drive started failing so i switched over to my windows machine. So i figured out the problem, I installed Visual Studio for the Web which doesn't include a C++ compiler. I uninstalled that version and installed the community version.. now everything seems to be working fine.

@gregjhogan

This comment has been minimized.

gregjhogan commented Jul 17, 2015

I also had this problem because I had VS 2013 Express for Web installed, which doesn't include the C++ compilers. However, the Windows 7 64-bit SDK does include the C++ compiler (but you have to pick it during the installation process).

@yacineMTB

This comment has been minimized.

yacineMTB commented Jul 17, 2015

I have this issue. Can't I just use MinGW compiler or sometihing?

@JeffreyBPetersen

This comment has been minimized.

JeffreyBPetersen commented Oct 12, 2015

Installing Visual Studio Community Edition (2015) with Visual C++ selected in the install solved the issue for me on Windows 8.1.

@brokenalarms

This comment has been minimized.

brokenalarms commented Nov 3, 2015

I can confirm @JeffreyBPetersen 's fix, combined with setting "npm config set msvs_version 2015 --global" in the command line solved the issue for me. Though I tried every other way possible without having to install 8 gigs worth of a program I'll never use first....seems excessive.

@Moytri

This comment has been minimized.

Moytri commented Nov 17, 2015

This occurs when I am going to install socket.io . How to solve it?

C:\try1>npm install --save socket.io@1.3.7

utf-8-validate@1.2.1 install C:\try1\node_modules\socket.io\node_modules\engin
e.io\node_modules\ws\node_modules\utf-8-validate
node-gyp rebuild

C:\try1\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modul
es\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nod
ejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.
js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
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:\try1\node_modules\socket.io\node_modules\engine.io
\node_modules\ws\node_modules\utf-8-validate\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\try1\node_modules\socket.io\node_modules\engine.io\node_modules
ws\node_modules\utf-8-validate
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

bufferutil@1.2.1 install C:\try1\node_modules\socket.io\node_modules\engine.io
\node_modules\ws\node_modules\bufferutil
node-gyp rebuild

C:\try1\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modul
es\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs
node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js"
rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
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:\try1\node_modules\socket.io\node_modules\engine.io
\node_modules\ws\node_modules\bufferutil\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\try1\node_modules\socket.io\node_modules\engine.io\node_modules
ws\node_modules\bufferutil
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate@1.2.1
npm WARN optional dep failed, continuing bufferutil@1.2.1

bufferutil@1.2.1 install C:\try1\node_modules\socket.io\node_modules\socket.io
-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
node-gyp rebuild


C:\try1\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine
.io-client\node_modules\ws\node_modules\bufferutil>if not defined npm_config_nod
e_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\no
de_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
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:\try1\node_modules\socket.io\node_modules\socket.io
-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil\b
-uild\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\try1\node_modules\socket.io\node_modules\socket.io-client\node_m
odules\engine.io-client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

utf-8-validate@1.2.1 install C:\try1\node_modules\socket.io\node_modules\socke
t.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-val
idate
node-gyp rebuild

|
|

.io-client\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config
_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin...
.\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
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:\try1\node_modules\socket.io\node_modules\socket.io
-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-valida
te\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\try1\node_modules\socket.io\node_modules\socket.io-client\node_m
odules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil@1.2.1
npm WARN optional dep failed, continuing utf-8-validate@1.2.1
socket.io@1.3.7 node_modules\socket.io
├── debug@2.1.0 (ms@0.6.2)
├── has-binary-data@0.1.3 (isarray@0.0.1)
├── socket.io-parser@2.2.4 (isarray@0.0.1, debug@0.7.4, component-emitter@1.1.2,
benchmark@1.0.0, json3@3.2.6)
├── socket.io-adapter@0.3.1 (object-keys@1.0.1, debug@1.0.2, socket.io-parser@2.
2.2)
├── engine.io@1.5.4 (base64id@0.1.0, debug@1.0.3, engine.io-parser@1.2.2, ws@0.8
.0)
└── socket.io-client@1.3.7 (to-array@0.1.3, debug@0.7.4, indexof@0.0.1, componen
t-bind@1.0.0, backo2@1.0.2, object-component@0.0.3, component-emitter@1.1.2, has
-binary@0.1.6, parseuri@0.0.2, engine.io-client@1.5.4)

@black-snow

This comment has been minimized.

black-snow commented Dec 6, 2015

I, too, just ran into this. Installing VS2015 now. --- fixed it

@mizhon

This comment has been minimized.

mizhon commented Dec 30, 2015

me too, same error happened when typing command: npm start

@tomhicz

This comment has been minimized.

tomhicz commented Jan 22, 2016

After running into this error when trying to use Foundation 6's build tool I founf this thread and just spent like an hour installing 11gb of god knows what that I don't need from the community edition.

Then I found this thread karma-runner/karma#536
and, if they are correct, none of that is needed anyway, as it's just for an optional native build, and there is a JS fallback.
So I'm now uninstalling god knows how much MS crap and hoping it hasn't fubared my system.

It seems like the issue here is that the error message is totally misleading. It probably should be a warning not an error, it should probably mention that it's optional and there is a fallback, and it should probably be updated with correct current advice for those who might actually want to install the C++ runtime.

It seems like the errors also caused the installation of node modules to be halted, so I did have to run "npm install" in the folder to get things set up.

If i'm wrong then maybe it is essential for some uses, but either way the error message should probably be updated.

@juberjj

This comment has been minimized.

juberjj commented May 21, 2016

I'm getting the same problem here. I can't understand why Windows don't offer a better support for this.

I was trying to install a simple package "libxmljs" on a Windows 7 x64, I had initially VS2013 installed + Python27 and it would either complain about MSBuild or something else. Followed a more than a couple of advice, install this uninstall that but no luck.

Now I'm trying it from scratch, newly installed W7 with Net Framework 4.5 installed (see error below), no VS installed but I'm trying to figure if full VS is really necessary as I would't need that so waste of space.

If so, what version because I had 2013 and even 2015 installed and got loads of error but I could not get that package installed.

Any suggestions????

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
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. C:\test\node_modules\rhmap-stats\node_modules\stats-influxdb\node_modules\diskusage\node_modules\ref\build\binding.sln]
gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1

@black-snow

This comment has been minimized.

black-snow commented May 25, 2016

@juberjj have you already tried w/ VS2015 (express) installed?

@juberjj

This comment has been minimized.

juberjj commented May 26, 2016

@black-snow I did indeed and I got the same problem. I had start a new machine altogether with NF 4.5, Python 2.7 and MVS 2013 (all fresh installation).
I don't have a full node package for Windows installed as I would need to switch between versions (long story) so I have NVM and installed versions through NVM.

Node version is 0.10.30 and NPM 1.4.21, but errors would also occur with versions 4.4.2 and 5.3.0.

Also installing a package like libxml-xsd (which I was able to install) MVS spills loads of warning messages, funnily enough I had the same package installed on Ubuntu 16.0 and I had no problem whatsoever.

@black-snow

This comment has been minimized.

black-snow commented May 26, 2016

@juberjj What now, did you use VS 2013 or 2015?

@spitWind

This comment has been minimized.

spitWind commented Nov 8, 2017

好多依赖,,,,,,不喜欢

@dixiaochang123

This comment has been minimized.

dixiaochang123 commented Nov 8, 2017

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

@brunolucena

This comment has been minimized.

brunolucena commented Nov 10, 2017

"npm install --global --production windows-build-tools" solved for me. Thanks.

@refack

This comment has been minimized.

Member

refack commented Nov 10, 2017

I'm closing this issue since it's 4 years old, and originally refers to to VS2013. It should still be googleable, and I hope it contains helpful information.

@refack refack closed this Nov 10, 2017

@arnaudcasame

This comment has been minimized.

arnaudcasame commented Nov 28, 2017

Thank you guys

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

It amazingly worked for me, it took several minutes to install but built successfully my node-sass.
Thank you for the solution guys****

@sinhautkarsh2014

This comment has been minimized.

sinhautkarsh2014 commented Dec 11, 2017

npm install --global --production windows-build-tools
Working for windows 2012 r2, thanks for the solution. Faced the issue while installing the nlp module 'natural'.

@pixelgoo

This comment has been minimized.

pixelgoo commented Jan 8, 2018

npm install --global --production windows-build-tools
Took 15 minutes to install but worked. Indeed node-sass failing to build on Windows 10 without this.

@gettoarun

This comment has been minimized.

gettoarun commented Jan 15, 2018

Worked for me too ! Thanks !

@ADTC

This comment has been minimized.

ADTC commented Feb 3, 2018

Adding windows-build-tools didn't help. That installation failed on me completely after sucking up 1GB of data and wasting my time.

Finally I figured out, I need to install the @latest version of the packages and update the dependency version.

npm i ember-cli-sass@latest ember-frost-core@latest ember-frost-tabs@latest ember-tooltips@latest --save-dev
             -- OR --
npm i ember-cli-sass@latest --save-dev
npm i ember-frost-core@latest --save-dev
npm i ember-frost-tabs@latest --save-dev
npm i ember-tooltips@latest --save-dev
@ADTC

This comment has been minimized.

ADTC commented Feb 8, 2018

(This is an update to my comment above.)

Sure it worked to install the latest versions, but then later I discovered that some parts of my project broke. So I had to ditch the latest versions and rollback to the original dependency versions.

Now I'm back at the problem with build tools. Although I have installed Python2 and MSBuild (Visual Studio Build Tools 2015), whenever I try to run npm install MSBuild will spit out an error that I need to upgrade the project (something I cannot do). But finally I managed to solve the problem. See below how I did it:

Assuming you have already installed build tools, which you can either by using windows-build-tools or by downloading it here.

npm config set msvs_version 2015 --global
npm install

Note: The second command should be the one that is failing for you due to MSBuild error. So it could also be something like npm install node-sass or npm rebuild node-sass.

Credits to the first command: #629 (comment)

@jeremysu0131

This comment has been minimized.

jeremysu0131 commented Feb 9, 2018

If I want to install in yarn. Is this command correct?
yarn global add windows-build-tools

@shinank

This comment has been minimized.

shinank commented Feb 19, 2018

@jeremysu0131 that worked for me. Thanks!

@Macromeda

This comment has been minimized.

Macromeda commented Feb 23, 2018

why use VC++.NET for developing packages for node ? that doesnt make any sense

@ADTC

This comment has been minimized.

ADTC commented Feb 23, 2018

It is attempting to build the binary from the source for your particular system. That's where things go wrong.

They have binaries available for some systems. It tries to download one, but if one isn't available for your system it tries to build one using VC++. But the problem is VC++ wants you to upgrade the project. The solution (my last comment) is to force VC++ to build the project without upgrading.

This is what I understood.

@danilo-teixeira-2

This comment has been minimized.

danilo-teixeira-2 commented Mar 27, 2018

npm install --global --production windows-build-tools
Worked for me! Thanks !!!!

@hxl1314hxl

This comment has been minimized.

hxl1314hxl commented Mar 27, 2018

好多次遇到类似情况

@abdufarag

This comment has been minimized.

abdufarag commented May 5, 2018

npm install --global --production windows-build-tools
No need for Visual Studio. This has what you need.

@gsidler

This comment has been minimized.

gsidler commented Jun 6, 2018

I tried to above suggested npm install --global --production windows-build-tools, which has been confirmed to work for many. For me it was always hanging.

I finally managed to get this working by installing Node.js 8 instead of Node.js 10. I hope this might save someone some debugging time.

@vanquyettran

This comment has been minimized.

vanquyettran commented Jun 27, 2018

Installing Visual Studio helped me while npm install --global --production windows-build-tools was not working

https://visualstudio.microsoft.com/vs/community/

@xiMenChuiXui

This comment has been minimized.

xiMenChuiXui commented Jul 29, 2018

Worked for me too ! Thanks npm install --global --production windows-build-tools!

@steady-daddy

This comment has been minimized.

steady-daddy commented Aug 1, 2018

Got error installing composer-cli@0.19.5
Ran
npm install --global --production windows-build-tools
npm uninstall -g composer-cli
npm install -g composer-cli@0.19.5

in that order and it worked.

@d3x0r

This comment has been minimized.

d3x0r commented Aug 1, 2018

Ran into this problem on another system....

found solution in this reply (after trying many others) #307 (comment)

npm config set msvs_version 2015 --global

without installing community IDE.

@tatsujb

This comment has been minimized.

tatsujb commented Nov 14, 2018

I'm closing this issue since it's 4 years old, and originally refers to to VS2013. It should still be googleable, and I hope it contains helpful information.

it's not googlable. I took ages to find this. node-sass is kicking this old bug back into full gear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment