MSBuild error while installing karma on Windows8
I got the following error while running %npm install -g karma The options provided by the error message: .NET 2.0 SDK and/or Visual Studio 2005 are not supported in Windows 8.
[email protected] install C:\Users\Julio\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\Julio\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" 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 Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\Julio\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\binding.sln] 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:\Users\Julio\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\binding.sln] C:\Users\Julio\AppData\Roaming\npm\karma -> C:\Users\Julio\AppData\Roaming\npm\node_modules\karma\bin\karma [email protected] C:\Users\Julio\AppData\Roaming\npm\node_modules\karma
Full install log is below. npm http GET https://registry.npmjs.org/karma npm http 304 https://registry.npmjs.org/karma npm http GET https://registry.npmjs.org/pause/0.0.1 npm http GET https://registry.npmjs.org/http-proxy npm http GET https://registry.npmjs.org/q npm http GET https://registry.npmjs.org/lodash npm http GET https://registry.npmjs.org/chokidar npm http GET https://registry.npmjs.org/glob npm http GET https://registry.npmjs.org/socket.io npm http GET https://registry.npmjs.org/coffee-script npm http GET https://registry.npmjs.org/mime npm http GET https://registry.npmjs.org/growly npm http GET https://registry.npmjs.org/xmlbuilder/0.4.2 npm http GET https://registry.npmjs.org/optimist/0.3.5 npm http GET https://registry.npmjs.org/istanbul/0.1.22 npm http GET https://registry.npmjs.org/LiveScript/1.0.1 npm http GET https://registry.npmjs.org/colors/0.6.0-1 npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3 npm http GET https://registry.npmjs.org/minimatch npm http GET https://registry.npmjs.org/rimraf npm http GET https://registry.npmjs.org/log4js npm http 304 https://registry.npmjs.org/pause/0.0.1 npm http 304 https://registry.npmjs.org/chokidar npm http 304 https://registry.npmjs.org/q npm http 304 https://registry.npmjs.org/lodash npm http 304 https://registry.npmjs.org/http-proxy npm http 304 https://registry.npmjs.org/glob npm http 304 https://registry.npmjs.org/socket.io npm http 304 https://registry.npmjs.org/coffee-script npm http 304 https://registry.npmjs.org/mime npm http 304 https://registry.npmjs.org/growly npm http 304 https://registry.npmjs.org/xmlbuilder/0.4.2 npm http 304 https://registry.npmjs.org/optimist/0.3.5 npm http 304 https://registry.npmjs.org/LiveScript/1.0.1 npm http 304 https://registry.npmjs.org/istanbul/0.1.22 npm http 304 https://registry.npmjs.org/colors/0.6.0-1 npm http 304 https://registry.npmjs.org/dateformat/1.0.2-1.2.3 npm http 304 https://registry.npmjs.org/minimatch npm http 304 https://registry.npmjs.org/rimraf npm http 304 https://registry.npmjs.org/log4js npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund npm http GET https://registry.npmjs.org/wordwrap npm http GET https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/base64id/0.1.0 npm http GET https://registry.npmjs.org/redis/0.7.3 npm http GET https://registry.npmjs.org/prelude-ls npm http GET https://registry.npmjs.org/async/0.1.15 npm http GET https://registry.npmjs.org/dequeue/1.0.3 npm http GET https://registry.npmjs.org/semver npm http GET https://registry.npmjs.org/readable-stream npm http GET https://registry.npmjs.org/wordwrap npm http GET https://registry.npmjs.org/abbrev npm http GET https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/esprima npm http GET https://registry.npmjs.org/handlebars npm http GET https://registry.npmjs.org/fileset npm http GET https://registry.npmjs.org/escodegen npm http GET https://registry.npmjs.org/nopt npm http GET https://registry.npmjs.org/mkdirp npm http GET https://registry.npmjs.org/which npm http 304 https://registry.npmjs.org/graceful-fs npm http 304 https://registry.npmjs.org/graceful-fs npm http 304 https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/lru-cache npm http 304 https://registry.npmjs.org/wordwrap npm http 304 https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/utile npm http 304 https://registry.npmjs.org/base64id/0.1.0 npm http 304 https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/pkginfo npm http 304 https://registry.npmjs.org/redis/0.7.3 npm http 304 https://registry.npmjs.org/prelude-ls npm http 304 https://registry.npmjs.org/inherits npm http 304 https://registry.npmjs.org/async/0.1.15 npm http 304 https://registry.npmjs.org/dequeue/1.0.3 npm http 304 https://registry.npmjs.org/semver npm http 304 https://registry.npmjs.org/readable-stream npm http 304 https://registry.npmjs.org/wordwrap npm http 304 https://registry.npmjs.org/abbrev npm http 304 https://registry.npmjs.org/esprima npm http 304 https://registry.npmjs.org/async npm http 304 https://registry.npmjs.org/handlebars npm http 304 https://registry.npmjs.org/fileset npm http 304 https://registry.npmjs.org/escodegen npm http 304 https://registry.npmjs.org/nopt npm http 304 https://registry.npmjs.org/mkdirp npm http 304 https://registry.npmjs.org/which npm http 304 https://registry.npmjs.org/utile npm http 304 https://registry.npmjs.org/pkginfo npm http GET https://registry.npmjs.org/i npm http GET https://registry.npmjs.org/deep-equal npm http GET https://registry.npmjs.org/ncp npm http GET https://registry.npmjs.org/estraverse npm http GET https://registry.npmjs.org/source-map npm http GET https://registry.npmjs.org/uglify-js npm http 304 https://registry.npmjs.org/i npm http 304 https://registry.npmjs.org/ncp npm http 304 https://registry.npmjs.org/deep-equal npm http 304 https://registry.npmjs.org/uglify-js npm http 304 https://registry.npmjs.org/estraverse npm http 304 https://registry.npmjs.org/source-map npm http GET https://registry.npmjs.org/ws npm http GET https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http GET https://registry.npmjs.org/amdefine npm http 304 https://registry.npmjs.org/uglify-js/1.2.5 npm http 304 https://registry.npmjs.org/ws npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http 304 https://registry.npmjs.org/amdefine npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http GET https://registry.npmjs.org/zeparser/0.0.5 npm http GET https://registry.npmjs.org/options npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/tinycolor npm http 304 https://registry.npmjs.org/zeparser/0.0.5 npm http 304 https://registry.npmjs.org/commander npm http 304 https://registry.npmjs.org/tinycolor npm http 304 https://registry.npmjs.org/options
[email protected] install C:\Users\Julio\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\Julio\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" 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 Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\Julio\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\binding.sln] 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:\Users\Julio\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\binding.sln] C:\Users\Julio\AppData\Roaming\npm\karma -> C:\Users\Julio\AppData\Roaming\npm\node_modules\karma\bin\karma [email protected] C:\Users\Julio\AppData\Roaming\npm\node_modules\karma +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] ([email protected]) +-- [email protected] ([email protected], [email protected]) +-- [email protected] ([email protected]) +-- [email protected] ([email protected]) +-- [email protected] ([email protected], [email protected]) +-- [email protected] ([email protected], [email protected], [email protected], [email protected]) +-- [email protected] ([email protected], [email protected]) +-- [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) +-- [email protected] ([email protected], [email protected], [email protected], [email protected])
This looks like an issue with building socket.io, specifically the ws package that it depends on, based on the log.
However, this is more of a core Node / gyp issue anyhow.. and I think the error message may be a red herring. You should just be able to install the Windows SDK from here and you'll be good to go.
Just note that this isn't a Karma issue.
If the installation failed, the it would have quit with npm not ok which is not the case. The error you are seeing is because of an optional dependency that failed to compile in ws. We are using native bindings to speed up some operation and to do UTF-8 validation, there are pure javascripts fallbacks in place for when compilation fails..
Which all work fine as the installation is successful.
@jcastill0 my point was that you don't need Visual Studio 2005 -- the message about the .NET Framework 2 SDK is misleading.
You just need MSBuild and the C++ compiler, which come along with the Windows SDK I gave you the link to (or by installing a later version of Visual Studio that work on Win8)
http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx
I'm on Win8 / VS2012 and building native code through npm is not a problem.
@3rd-Eden is right - this is just optional compilation of native module to speed things up. Even without native module it will still work.
In any case, not a Karma issue, so closing. If you want to compile native modules, use linux/mac ;-)
FYI: I had a similar problem. See http://chocolatey.org/packages/Yeoman#comment-898194541
The only problem here is that is no problem and that people should read the complete output instead of freaking out when you read the word "error" — Twitter: @3rdEden Github: @3rd-Eden
On Thu, May 16, 2013 at 5:19 PM, Darcy Parker [email protected] wrote:
FYI: I had a similar problem. See http://chocolatey.org/packages/Yeoman#comment-898194541
Reply to this email directly or view it on GitHub: https://github.com/karma-runner/karma/issues/536#issuecomment-18007850
It seems people are having difficulty understanding the error's output. It was certainly a stumbling block for me and it wasn't obvious that the compilation of native code was optional. An FAQ and documentation about this would probably help.
Same on Windows 7, of course. From comments here I trust it will be okay, but there is nothing in the output to suggest this will not be a problem and I would rather have known without having to search for the answer.
I installed Windows 8 SDK from http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx but I still face the damn microsoft error when I run npm install inside my angular project, I don't need to install microsoft VS, can any one help me with this.
I'm using Windows 8.1 x64 bit nod v0.10.22
@yabasha This error should not prevent you from using Karma, it only fails to compile the native "ws" module, but there is a JS fallback... Sorry, I don't know how to disable this on Windows.
I'm building angularjs project using yeoman and after generating the scaffolding I run npm install everything is working fine except this error