安装npm模块karma失败并出现构建错误消息

时间:2015-01-01 01:48:16

标签: node.js npm karma-runner

尝试安装Karma NPM模块时出现以下错误。不知道发生了什么,我在制作错误的正面或反面时遇到了麻烦。谷歌搜索没有提供任何帮助。非常感谢任何见解。

> fsevents@0.3.1 install /usr/local/lib/node_modules/karma/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node: Finished
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../node_modules/nan/nan.h:29:
/usr/include/c++/4.2.1/string:46:10: fatal error: 'bits/stringfwd.h' file not found
#include <bits/stringfwd.h>
     ^
1 error generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-              gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"     "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/karma/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm WARN optional dep failed, continuing fsevents@0.3.1

> ws@0.4.32 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.30 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.42 (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.33)
├── http-proxy@0.10.4 (pkginfo@0.3.0, utile@0.2.1)
├── chokidar@0.12.5 (async-each@0.1.6, readdirp@1.3.0)
├── connect@2.26.6 (fresh@0.2.4, cookie@0.1.2, pause@0.0.1, cookie-signature@1.0.5, response-time@2.0.1, vhost@3.0.0, basic-auth-connect@1.0.0, on-headers@1.0.0, bytes@1.0.0, media-typer@0.3.0, parseurl@1.3.0, cookie-parser@1.3.3, depd@0.4.5, qs@2.2.4, connect-timeout@1.3.0, debug@2.0.0, method-override@2.2.0, finalhandler@0.2.0, serve-favicon@2.1.7, type-is@1.5.5, multiparty@3.3.2, express-session@1.8.2, compression@1.1.2, csurf@1.6.4, errorhandler@1.2.3, morgan@1.3.2, serve-index@1.2.1, serve-static@1.6.4, body-parser@1.8.4)
└── socket.io@0.9.16 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16)

1 个答案:

答案 0 :(得分:1)

经过大量繁琐的测试后,我发现问题在于我没有运行最新版本的XCode命令行工具。哦...确保检查孩子的更新!

相关问题