我无法通过npm安装Karma。
我的Mac:OS X 10.9.2(达尔文13.1.0) 我的节点版本是:v0.10.26 我的npm版本是:v1.4.3
sudo npm install -g karma
npm http GET https://registry.npmjs.org/karma
npm http 304 https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/di
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/chokidar
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/http-proxy
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/log4js
npm http GET https://registry.npmjs.org/useragent
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/di
npm http 304 https://registry.npmjs.org/chokidar
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/http-proxy
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/log4js
npm http 304 https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/useragent
npm http 304 https://registry.npmjs.org/connect
npm http 200 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/recursive-readdir/0.0.2
npm http GET https://registry.npmjs.org/fsevents/0.2.0
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/minimist
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/socket.io-client/0.9.16
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/amdefine
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/batch/0.5.0
npm http GET https://registry.npmjs.org/qs/0.6.6
npm http GET https://registry.npmjs.org/cookie-signature/1.0.1
npm http 304 https://registry.npmjs.org/recursive-readdir/0.0.2
npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/cookie/0.1.0
npm http GET https://registry.npmjs.org/send/0.1.4
npm http GET https://registry.npmjs.org/bytes/0.2.1
npm http GET https://registry.npmjs.org/fresh/0.2.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/uid2/0.0.3
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/methods/0.1.0
npm http GET https://registry.npmjs.org/raw-body/1.1.2
npm http GET https://registry.npmjs.org/negotiator/0.3.0
npm http GET https://registry.npmjs.org/multiparty/2.2.0
npm http 304 https://registry.npmjs.org/fsevents/0.2.0
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/base64id/0.1.0
npm http 304 https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.16
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/async/0.1.15
npm http 304 https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/batch/0.5.0
npm http 304 https://registry.npmjs.org/qs/0.6.6
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1
npm http 304 https://registry.npmjs.org/cookie/0.1.0
npm http 304 https://registry.npmjs.org/bytes/0.2.1
npm http 304 https://registry.npmjs.org/send/0.1.4
npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/methods/0.1.0
npm http 304 https://registry.npmjs.org/fresh/0.2.0
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/uid2/0.0.3
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/raw-body/1.1.2
> fsevents@0.2.0 install /usr/local/lib/node_modules/karma/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
SOLINK_MODULE(target) Release/fse.node: Finished
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/multiparty/2.2.0
npm http 304 https://registry.npmjs.org/negotiator/0.3.0
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/i
npm http 304 https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/isarray/0.0.1
npm http 304 https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/stream-counter
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
npm http 304 https://registry.npmjs.org/stream-counter
> ws@0.4.31 install /usr/local/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node: Finished
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished
karma@0.12.6 /usr/local/lib/node_modules/karma
├── di@0.0.1
├── graceful-fs@2.0.3
├── rimraf@2.2.6
├── colors@0.6.2
├── mime@1.2.11
├── q@0.9.7
├── glob@3.2.9 (inherits@2.0.1)
├── minimatch@0.2.14 (sigmund@1.0.0, lru-cache@2.5.0)
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.8)
├── lodash@2.4.1
├── source-map@0.1.33 (amdefine@0.1.0)
├── useragent@2.0.8 (lru-cache@2.2.4)
├── log4js@0.6.13 (semver@1.1.4, async@0.1.15, readable-stream@1.0.26-4)
├── http-proxy@0.10.4 (pkginfo@0.3.0, utile@0.2.1)
├── connect@2.12.0 (uid2@0.0.3, methods@0.1.0, debug@0.8.0, cookie-signature@1.0.1, pause@0.0.1, fresh@0.2.0, qs@0.6.6, bytes@0.2.1, buffer-crc32@0.2.1, raw-body@1.1.2, batch@0.5.0, cookie@0.1.0, negotiator@0.3.0, send@0.1.4, multiparty@2.2.0)
├── chokidar@0.8.2 (recursive-readdir@0.0.2, fsevents@0.2.0)
└── socket.io@0.9.16 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16)
答案 0 :(得分:5)
sudo npm install -g karma-cli
遗憾的是,CLI工具还有一个单独的模块。