node.jsangularjsvcbuildkarma-runner

Karma install failing on rebuild npm node.js


So i'm tryin to get karma working on my Windows 7 machine and I'm continuing to have trouble.

I'm using node.js 0.10.7 and using the command npm install -g karma. The first issue was missing vcbuild, so I installed http://www.microsoft.com/en-us/download/details.aspx?id=11310 and added it to my path. Now I'm getting the below error during rebuild:

C:\Users\Steve\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\nod e_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nodejs\node_mo dules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild

..\src\bufferutil.cc(55): warning C4267: 'initializing' : conversion from 'size _t' to 'unsigned int', possible loss of data ..\src\bufferutil.cc(66): warning C4267: 'initializing' : conversion from 'size _t' to 'unsigned int', possible loss of data C:\Users\Steve.node-gyp\0.10.6\deps\v8\include\v8.h(184): warning C4506: no de finition for inline function 'v8::Persistent v8::Persistent::New(v8::Hand le)'

LINK : fatal error LNK1181: cannot open input file 'C:\Users\Steve.node-gyp\0. 10.6\node.lib'

Project : warning PRJ0018: The following environment variables were not found: C:\Users\Steve.node-gyp\0.10.6\deps\v8\include\v8.h(184): warning C4506: no de finition for inline function 'v8::Persistent v8::Persistent::New(v8::Hand le)'

LINK : fatal error LNK1181: cannot open input file 'C:\Users\Steve.node-gyp\0. 10.6\node.lib'

Project : warning PRJ0018: The following environment variables were not found: C:\Users\Steve\AppData\Roaming\npm\karma -> C:\Users\Steve\AppData\Roaming\npm\n ode_modules\karma\bin\karma

karma@0.8.5 C:\Users\Steve\AppData\Roaming\npm\node_modules\karma ├── pause@0.0.1 ├── dateformat@1.0.2-1.2.3 ├── xmlbuilder@0.4.2 ├── colors@0.6.0-1 ├── mime@1.2.9 ├── growly@1.1.1 ├── chokidar@0.6.2 ├── q@0.9.3 ├── coffee-script@1.6.2 ├── rimraf@2.1.4 (graceful-fs@1.2.1) ├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.0) ├── optimist@0.3.5 (wordwrap@0.0.2) ├── LiveScript@1.0.1 (prelude-ls@1.0.0) ├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.1) ├── log4js@0.6.5 (dequeue@1.0.3, semver@1.1.4, async@0.1.15, readable-stream@1.0 .2) ├── lodash@1.1.1 ├── http-proxy@0.10.2 (pkginfo@0.2.3, utile@0.1.7) ├── istanbul@0.1.22 (abbrev@1.0.4, which@1.0.5, fileset@0.1.5, wordwrap@0.0.2, n opt@2.0.0, async@0.1.22, mkdirp@0.3.5, esprima@0.9.9, escodegen@0.0.22, handleba rs@1.0.11) └── socket.io@0.9.14 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-c lient@0.9.11)

The LINK errors are in read and that directory is missing. The other bold font are warnings. I haven't had problems with node.js, but trying to run karma fails. Any ideas? This is based on the AngularJS tutorial...


Solution

  • If the installer wants the file "C:\Users\Steve\node-gyp\0.10.6\node.lib", you just have to give it that file.

    1. Open the "C:\Users\Steve\node-gyp\0.10.6" directory.

    2. Within that directory, there should be "ia32" and "x64" subdirectories - open the correct one for your architecture.

    3. There should be a "node.lib" file within the subdirectory - simply copy that file to the parent directory (C:\Users\Steve\node-gyp\0.10.6).

    4. Re-run "node install -g karma"

    Once I did that, the karma build still reported a few warnings but no errors.

    To continue with the tutorial, you'll want to add the npm module directory (typically C:\Users\\AppData\Roaming\npm) to your PATH.