搜索

首页  >  问答  >  正文

node.js - npm 安装 Karma 报错 (node-gyp rebuild 2> builderror.log) || (exit 0)

根据 Karma 官网指示进行安装,但是报错

> ws@0.4.25 install /usr/local/share/npm/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

有人知道怎么解决吗?

黄舟黄舟2778 天前849

全部回复(4)我来回复

  • 怪我咯

    怪我咯2017-04-17 11:01:51

    什么操作系统下。。。。?

    回复
    0
  • ringa_lee

    ringa_lee2017-04-17 11:01:51

    我在mac遇到相同的问题

    回复
    0
  • 大家讲道理

    大家讲道理2017-04-17 11:01:51

    我也是,在 Mac Book Pro 遇到同样的问题!

    回复
    0
  • 阿神

    阿神2017-04-17 11:01:51

    我在这样应该就行了吧

    npm install node-gyp -g

    我这边就这样解决了

    [root@www yeeco_1.0]# npm install node-gyp -g
    /usr/local/bin/node-gyp -> /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js
    node-gyp@2.0.1 /usr/local/lib/node_modules/node-gyp
    ├── rimraf@2.4.1
    ├── graceful-fs@3.0.8
    ├── semver@4.3.6
    ├── fstream@1.0.7 (inherits@2.0.1)
    ├── minimatch@1.0.0 (sigmund@1.0.1, lru-cache@2.6.5)
    ├── mkdirp@0.5.1 (minimist@0.0.8)
    ├── osenv@0.1.3 (os-tmpdir@1.0.1, os-homedir@1.0.0)
    ├── tar@1.0.3 (inherits@2.0.1, block-stream@0.0.8)
    ├── nopt@3.0.3 (abbrev@1.0.7)
    ├── path-array@1.0.0 (array-index@0.1.1)
    ├── which@1.1.1 (is-absolute@0.1.7)
    ├── glob@4.5.3 (inherits@2.0.1, once@1.3.2, inflight@1.0.4, minimatch@2.0.8)
    ├── npmlog@1.2.1 (ansi@0.3.0, gauge@1.2.2, are-we-there-yet@1.0.4)
    └── request@2.58.0 (caseless@0.10.0, aws-sign2@0.5.0, stringstream@0.0.4, forever-agent@0.6.1, tunnel-agent@0.4.1, oauth-sign@0.8.0, isstream@0.1.2, extend@2.0.1, json-stringify-safe@5.0.1, node-uuid@1.4.3, qs@3.1.0, tough-cookie@2.0.0, bl@0.9.4, combined-stream@1.0.5, http-signature@0.11.0, mime-types@2.0.14, form-data@1.0.0-rc1, hawk@2.3.1, har-validator@1.8.0)

    回复
    0
  • 取消回复