尝试安装Karma时出错

时间:2014-10-02 22:16:45

标签: node.js karma-runner

当我尝试使用命令

安装karma
npm install -g karma

我收到以下错误,我无法解码。 npm安装在我的用户帐户下,因此权限不应该是一个问题,错误消息也不会表明它可能是。我试着用sudo执行它只是为了它,并得到了相同的消息。有什么想法吗?

> fsevents@0.3.0 install /Users/ethan/local/lib/node_modules/karma/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:86:
../src/constants.cc:10:66: warning: template argument uses unnamed type [-Wunnamed-type-template-args]
  object->Set(NanNew<v8::String>("kFSEventStreamEventFlagNone"), NanNew<v8::Integer>(kFSEventStreamEventFlagNone));
                                                                 ^~~~~~
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:290:1: note: unnamed type used in template argument was declared here
enum {
^
1 warning generated.
  SOLINK_MODULE(target) Release/fse.node
  SOLINK_MODULE(target) Release/fse.node: Finished

> ws@0.4.32 install /Users/ethan/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.24 /Users/ethan/local/lib/node_modules/karma
├── di@0.0.1
├── graceful-fs@2.0.3
├── rimraf@2.2.8
├── colors@0.6.2
├── mime@1.2.11
├── q@0.9.7
├── minimatch@0.2.14 (sigmund@1.0.0, lru-cache@2.5.0)
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
├── glob@3.2.11 (inherits@2.0.1, minimatch@0.3.0)
├── source-map@0.1.40 (amdefine@0.1.0)
├── lodash@2.4.1
├── useragent@2.0.10 (lru-cache@2.2.4)
├── log4js@0.6.21 (semver@1.1.4, async@0.2.10, readable-stream@1.0.32)
├── 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, cookie-signature@1.0.1, debug@0.8.1, pause@0.0.1, fresh@0.2.0, qs@0.6.6, bytes@0.2.1, raw-body@1.1.2, buffer-crc32@0.2.1, batch@0.5.0, cookie@0.1.0, negotiator@0.3.0, send@0.1.4, multiparty@2.2.0)
├── chokidar@0.9.0 (recursive-readdir@0.0.2, fsevents@0.3.0)
└── socket.io@0.9.17 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16)

1 个答案:

答案 0 :(得分:2)

这似乎是this SO question的副本,其中实际安装了karma但是karma-cli包也需要使用npm install -g karma-cli

全局安装