0

I'm attempting to install karma. The machine is windows 8.1. I have node v0.12.2 installed on the system.

I run the command npm install -g karma

And I get the following output....

> C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\
> node_modules\engine.io\node_modules\ws>if not defined
> npm_config_node_gyp (node "C:\Program
> Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\n
> ode-gyp\bin\node-gyp.js" rebuild )  else (rebuild) Building the
> projects in this solution one at a time. To enable parallel build,
> please add the "/m" switch.
> C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
> \node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj(18,3):
> error M SB4019: The imported project "C:\Microsoft.Cpp.Default.props"
> was not found. Co nfirm that the path in the <Import> declaration is
> correct, and that the file e xists on disk.
> C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
> \node_modules\engine.io\node_modules\ws\build\validation.vcxproj(18,3):
> error M SB4019: The imported project "C:\Microsoft.Cpp.Default.props"
> was not found. Co nfirm that the path in the <Import> declaration is
> correct, and that the file e xists on disk.
> 
> > [email protected] install C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\nod
> e_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\
> node_modules\ws
> > (node-gyp rebuild 2> builderror.log) || (exit 0)
> 
> 
> C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\
> node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws>if
> n ot defined npm_config_node_gyp (node "C:\Program
> Files\nodejs\node_modules\npm\b
> in\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
> )  else (r ebuild) Building the projects in this solution one at a
> time. To enable parallel build, please add the "/m" switch.
> C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
> \node_modules\socket.io-client\node_modules\engine.io-lient\node_modules\ws\bu
> ild\bufferutil.vcxproj(18,3): error MSB4019: The imported project
> "C:\Microsoft .Cpp.Default.props" was not found. Confirm that the path
> in the <Import> declar ation is correct, and that the file exists on
> disk.
> C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
> \node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\bu
> ild\validation.vcxproj(18,3): error MSB4019: The imported project
> "C:\Microsoft .Cpp.Default.props" was not found. Confirm that the path
> in the <Import> declar ation is correct, and that the file exists on
> disk. [email protected]
> C:\Users\xxxxx\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], semve [email protected]) 
> ├── [email protected] ([email protected], [email protected]) 
> ├── [email protected] ([email protected], [email protected], [email protected], async-each@0 .1.6, [email protected], [email protected], [email protected]) 
> ├── [email protected] ([email protected]) 
> ├── [email protected] ([email protected], [email protected], [email protected], [email protected] .5, [email protected], [email protected], [email protected], [email protected], basic-auth- [email protected], [email protected], [email protected], [email protected], connect-timeout@1.
 3.0, [email protected], [email protected], [email protected], [email protected], method-over [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])

I'm unsure how to fix this error.

I've googled for the MSB4019 error and came up with this page (npm install -g karma error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found) where they suggest running npm install --msvs_version=2013 and I got phantomjs installation errors relating to ELIFECYCLE. I further tried npm install --msvs_version=2012, as suggested in a comment and did not get errors -- but was still unable to install karma (same errors as above). Without Visual Studio installed, I'm unable to do the entire solution (though I don't think karma requires a full Visual Studio install)

This person (Error Installing Karma Using "npm install -g karma") also is struggling to install karma. I do have admin rights, so I tried running it as an administrator. That also failed, but with a different output:

C:\Windows\system32>npm install -g karma
npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node
":"0.12.2","npm":"2.7.4"})
npm WARN optional dep failed, continuing [email protected]
\


> [email protected] install C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\n
ode_modules\socket.io\node_modules\engine.io\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.
io\node_modules\engine.io\node_modules\ws>if not defined npm_config_node_gyp (no
de "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_module
s\node-gyp\bin\node-gyp.js" rebuild )  else (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:\Users\xxxxx\AppData\Roaming\npm\node_modules
\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\bind
ing.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 Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [C:\Users\xxxxx\AppData\Roaming\npm\node_modules
\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\bind
ing.sln]

> [email protected] install C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\
node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-clie
nt\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.
io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws>i
f not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\np
m\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else
 (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:\Users\xxxxx\AppData\Roaming\npm\node_modules
\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine
.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 Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [C:\Users\xxxxx\AppData\Roaming\npm\node_modules
\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine
.io-client\node_modules\ws\build\binding.sln]
[email protected] C:\Users\xxxxx\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], semve
[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]
.5, [email protected], [email protected], [email protected], [email protected]
, [email protected], [email protected], [email protected], [email protected], [email protected], finalhan
[email protected], [email protected], [email protected], [email protected], morgan
@1.3.2, [email protected], [email protected], [email protected], [email protected], se
[email protected], [email protected], [email protected], [email protected], csur
[email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], async-each@0
.1.6, [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected],
 [email protected], [email protected], [email protected])

I should note that npm install -g grunt and npm install -g bower both seem to complete fine. (though I should note that when attempting to run grunt on my project -- which works on a different system -- just hangs.

ANyway - searching on the errors presented when run as administartor,

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.

I found this github page for the karma runner: https://github.com/karma-runner/karma/issues/536 where it was suggested that one go here: https://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx and get the Windows 8 SDK. I've downloaded the Windows 8 SDK and have gotten the message that "The features installed on this computer all up-to-date".

Further, I've found a few other people that have mentioned ensuring that the path to your VCBuild.exe file is in your path. Which I have done.

After adding that, I get a whole new set of errors when running npm install -g karma. Unfortunately, I can't paste it all here as it just flows off the command line buffer. Here is a sampling:

C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket
.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws
\node_modules\nan\nan.h(873): error C2228: left of '.length' must have class/st
ruct/union [C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_mo
dules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\nod
e_modules\ws\build\binding.sln]
..\src\validation.cc(108): error C2248: 'v8::HandleScope::HandleScope' : cannot
 access protected member declared in class 'v8::HandleScope' [C:\Users\jfederer
-ou\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\
socket.io-client\node_modules\engine.io-client\node_modules\ws\build\binding.sl
n]
..\src\validation.cc(109): error C2664: 'v8::FunctionTemplate::New' : cannot co
nvert parameter 1 from 'void (__cdecl *)(const v8::FunctionCallbackInfo<T> &)'
to 'v8::Isolate *' [C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma
\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-cl
ient\node_modules\ws\build\binding.sln]
..\src\validation.cc(112): error C2039: 'NewSymbol' : is not a member of 'v8::S
tring' [C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_module
s\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_mo
dules\ws\build\binding.sln]
..\src\validation.cc(112): error C3861: 'NewSymbol': identifier not found [C:\U
sers\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\
node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\bui
ld\binding.sln]
..\src\validation.cc(134): error C2660: 'v8::True' : function does not take 0 a
rguments [C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_modu
les\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_
modules\ws\build\binding.sln]
..\src\validation.cc(134): error C2660: 'v8::False' : function does not take 0
arguments [C:\Users\xxxxx\AppData\Roaming\npm\node_modules\karma\node_mod
ules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node
_modules\ws\build\binding.sln]

I removed my additions to the vcbuild.exe in the system path and the errors returned to the previous "MSB3428" errors.

I have downloaded and installed (Convoluted method found via google to get it to install on Windows 8) the suggested .NET Framework 2.0 SDK. No change.

I have downloaded Visual Studio Community edition and got some new errors: (again, more than fit int he cmd-line buffer, so this is just a snippet)

          C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules
  \socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
  odules\ws\node_modules\nan\nan.h(84) : see declaration of 'NanSetPointerSafe'
C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\no
de_modules\nan\nan.h(858): warning C4267: 'argument' : conversion from 'size_t'
 to 'int', possible loss of data [C:\Users\xxxxxxx\AppData\Roaming\npm\node_mo
dules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\e
ngine.io-client\node_modules\ws\build\validation.vcxproj]
C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\no
de_modules\nan\nan.h(873): error C2065: 'value' : undeclared identifier [C:\Use
rs\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_
modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\va
lidation.vcxproj]
C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\no
de_modules\nan\nan.h(873): error C2228: left of '.length' must have class/struc
t/union [C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\
socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modu
les\ws\build\validation.vcxproj]
          type is 'unknown-type'
C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\no
de_modules\nan\nan.h(873): error C2780: 'bool NanSetPointerSafe(T *,T)' : expec
ts 2 arguments - 1 provided [C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules
\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine
.io-client\node_modules\ws\build\validation.vcxproj]
          C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules
  \socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
  odules\ws\node_modules\nan\nan.h(84) : see declaration of 'NanSetPointerSafe'
..\src\validation.cc(108): error C2248: 'v8::HandleScope::HandleScope' : cannot
 access protected member declared in class 'v8::HandleScope' [C:\Users\xxxxxxx
\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\soc
ket.io-client\node_modules\engine.io-client\node_modules\ws\build\validation.vc
xproj]
          C:\Users\xxxxxxx\.node-gyp\0.12.2\deps\v8\include\v8.h(816) : see de
  claration of 'v8::HandleScope::HandleScope'
          C:\Users\xxxxxxx\.node-gyp\0.12.2\deps\v8\include\v8.h(800) : see de
  claration of 'v8::HandleScope'
..\src\validation.cc(109): error C2664: 'v8::Local<v8::FunctionTemplate> v8::Fu
nctionTemplate::New(v8::Isolate *,v8::FunctionCallback,v8::Handle<v8::Value>,v8
::Handle<v8::Signature>,int)' : cannot convert argument 1 from 'void (__cdecl *
)(const v8::FunctionCallbackInfo<v8::Value> &)' to 'v8::Isolate *' [C:\Users\jf
ederer\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modul
es\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\validat
ion.vcxproj]
          There is no context in which this conversion is possible
..\src\validation.cc(112): error C2039: 'NewSymbol' : is not a member of 'v8::S
tring' [C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\s
ocket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modul
es\ws\build\validation.vcxproj]
          C:\Users\xxxxxxx\.node-gyp\0.12.2\deps\v8\include\v8.h(1599) : see d
  eclaration of 'v8::String'
..\src\validation.cc(112): error C3861: 'NewSymbol': identifier not found [C:\U
sers\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\nod
e_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\
validation.vcxproj]
..\src\validation.cc(134): error C2660: 'v8::True' : function does not take 0 a
rguments [C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_modules
\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_mod
ules\ws\build\validation.vcxproj]
..\src\validation.cc(134): error C2660: 'v8::False' : function does not take 0
arguments [C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\karma\node_module
s\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_mo
dules\ws\build\validation.vcxproj]
[email protected] C:\Users\xxxxxxx\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], semve
[email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], async-each@0
.1.6, [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected]
.5, [email protected], [email protected], [email protected], [email protected], basic-auth-
[email protected], [email protected], [email protected], [email protected], [email protected].
5, [email protected], [email protected], [email protected], [email protected], method-over
[email protected], [email protected], [email protected], [email protected], compression@1.
1.2, [email protected], [email protected], [email protected], [email protected], serve-sta
[email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected],
 [email protected], [email protected], [email protected])

Has ANYONE gotten Karma to install with npm on windows 8? Help?

UPDATE

Uninstalled node. Deleted all npm, npm-cache, and node directories. Deleted all temp package directories (.bower, .node-gyp, etc). Rebooted. Cleared path of any node related items as well. Rebooted again.

Installed Node.js 64 bit. Rebooted. Installed newest version of npm. Rebooted. Installed npm install --global yo bower grunt-cli. Rebooted. Cloned github repo (which is basically just a yeoman-scaffolded angular app) into a new folder. Expanded the commandline buffer and ran npm install. Note, the package.json file looks like this:

{
  "name": "learncontacts",
  "version": "0.0.0",
  "dependencies": {},
  "repository": {},
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-autoprefixer": "^2.0.0",
    "grunt-concurrent": "^1.0.0",
    "grunt-contrib-clean": "^0.6.0",
    "grunt-contrib-concat": "^0.5.0",
    "grunt-contrib-connect": "^0.9.0",
    "grunt-contrib-copy": "^0.7.0",
    "grunt-contrib-cssmin": "^0.12.0",
    "grunt-contrib-htmlmin": "^0.4.0",
    "grunt-contrib-imagemin": "^0.9.2",
    "grunt-contrib-jshint": "^0.11.0",
    "grunt-contrib-uglify": "^0.7.0",
    "grunt-contrib-watch": "^0.6.1",
    "grunt-filerev": "^2.1.2",
    "grunt-google-cdn": "^0.4.3",
    "grunt-karma": "*",
    "grunt-newer": "^1.1.0",
    "grunt-ng-annotate": "^0.9.2",
    "grunt-svgmin": "^2.0.0",
    "grunt-usemin": "^3.0.0",
    "grunt-wiredep": "^2.0.0",
    "jshint-stylish": "^1.0.0",
    "karma-jasmine": "*",
    "karma-phantomjs-launcher": "*",
    "load-grunt-tasks": "^3.1.0",
    "time-grunt": "^1.0.0"
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "scripts": {
    "test": "grunt test"
  }
}

... that resulted in a boatload of errors (thousands of lines). Most of them seem to be based around socket.io. I can't put more text in this post, so I can't show it all.

That said, I soildered on as if nothing was wrong and ran my bower install. That completed without error. When done I was able to succesfully grunt serve and grunt test.

From the little research I've done, it seems that if socket.io fails, there is a fallback. I suspect that's why it is working now.

... that said, anyone have any thoughts so we can sort some of this out?

Further research shows a potential solution in installing socket.io: NPM - Can't install socket.IO (for what it's worth, I tried it an it did not work...)

Community
  • 1
  • 1
lowcrawler
  • 6,777
  • 9
  • 37
  • 79
  • not directly related to your karma issue, but to install grunt it is ```npm install -g grunt-cli``` which will give you access to ```grunt``` binary. Then into each project, you must install grunt as local dependency with ```npm install grunt``` –  May 24 '15 at 03:57
  • I d suggest you try to install ```ws``` separately, it seems to be related to that package specifically. –  May 24 '15 at 04:07
  • `npm install -g ws` works without any issues. – lowcrawler May 26 '15 at 20:59

0 Answers0