node-gyp: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
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
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 85 (6 by maintainers)
We found the solution, just need run this command as administrator:
We try installing/removing a lot of software, but the solution was on documentation all the time 😃 #488 #307
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?
Hahah. Windows is as Important as PHP. 😛
I faced similar issue on windows 10 using node 6.7.0 and npm 3.10.3. Npm install gets stuck everytime at node-sass. I already had visual studio installed and i tried many solutions mentioned in this thread and other thread but none worked. Only solution which worked for me was:
and after that i ran :
which successfully fixed node-sass issue.
+1 to hating windows, i can’t get this to work even after installed visual studio 2015 express.
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.
npm install --global --production windows-build-tools No need for Visual Studio. This has what you need.
Worked great for me. Thanks.
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.
npm install --global --production windows-build-tools
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.好多次遇到类似情况
I met the same problem, and I already have VS 2013 Express installed. No way I’ll reinstall 2013. I hate windows.
npm install --global --production windows-build-tools
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’.Thank you guys
It amazingly worked for me, it took several minutes to install but built successfully my node-sass. Thank you for the solution guys****
why use VC++.NET for developing packages for node ? that doesnt make any sense
update:
i read that uninstalling python might stop the problem with the install “freezing” (link).
so i uninstalled python from windows > remove programs and then ran:
which produced:
and uninstalled and re-installed
ibm-watson
and am getting the same error messages.The error when installing
windows-build-tools
seems to be acknowledged here:https://github.com/felixrieseberg/windows-build-tools/issues/152
Edit
I also tried alternative solution here:
But still have same errors when installing
ibm-watson
re:node-gyp
anderror MSB3428: Could not load the Visual C++ component "VCBuild.exe"
.The only thing that worked for me (ie made the
"VCBuild.exe"
errors go away) was installing:boggles the mind … i’m trying to write a bloody html/javascript/css application, why do i need c# ?
Likely obvious to some, but you can only fix by
npm config set msvs_version ...
if you have the appropriate C++ on your system and you specify that version correctly. Quick way to check if so and which version(s): https://community.esri.com/docs/DOC-11365-how-to-determine-installed-net-and-c-runtime-versionsBut even if you have the correct file on you system somewhere, permissions can prevent config from working. So only do that as a last resort. I recommend trying this first:
npm install --global --production windows-build-tools
Ran into this problem on another system…
found solution in this reply (after trying many others) https://github.com/nodejs/node-gyp/issues/307#issuecomment-364210877
without installing community IDE.
(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.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
ornpm rebuild node-sass
.Credits to the first command: https://github.com/nodejs/node-gyp/issues/629#issuecomment-225320227
@epsilon-sajain, I know you’re not still waiting for the answer but for everyone else interested: For me it took 37 minutes.
I have this issue. Can’t I just use MinGW compiler or sometihing?
If I want to install in yarn. Is this command correct?
yarn global add windows-build-tools
Have used
npm install --global --production windows-build-tool
and is freezed for about 1hnpm install --global --production windows-build-tools
Worked for me! Thanks !!!Note: be aware that the .NET 2.0 SDK installation is SILENT. So there’s no UI neither a message, you will think it did nothing but after a few minutes just try your npm install again and it should work.
If you are using Windows 10 then try to run commands in PowerShell instead of Command Prompt.
npm install --global --production windows-build-tools
After running the above command, I manually installed the installers located in the below path:好多依赖,不喜欢
@hxl1314hxl 你有事情要问吗?node的中国人蛮多的。
Installing Visual Studio Community Edition (2015) with Visual C++ selected in the install solved the issue for me on Windows 8.1.
weird, it worked for me but I dont use the --production flag
npm install --global windows-build-tools
Just to let you know how it worked for me:
npm install --global --production windows-build-tools
did the job, but only after I rebooted Windows. I ran the command using Powershell as local Administrator.
Also the solution for me was to install NET Framework 2.0 Software Development Kit (SDK) .
Holy Moley! Is anyone worried about the 402 high risk vulnerabilities?
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.
“npm install --global --production windows-build-tools” solved for me. Thanks.
@himanshujobletics I suggest raising an issue in the module’s repo https://github.com/felixrieseberg/windows-build-tools/issues
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.