安装Karma时,node-gyp rebuild 2错误 [英] node-gyp rebuild 2 error when installing Karma
问题描述
我正在尝试将Karma安装到OSX v10.9.3.
I am trying to install Karma onto OSX v10.9.3.
我打开终端并输入npm install -g karma
.当我这样做时,将得到以下输出:
I open up the terminal and enter npm install -g karma
. When I do this, I get the following output:
mc-s089979% npm install -g karma
> 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
> 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.16 /usr/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)
├── source-map@0.1.33 (amdefine@0.1.0)
├── glob@3.2.11 (inherits@2.0.1, minimatch@0.3.0)
├── lodash@2.4.1
├── useragent@2.0.8 (lru-cache@2.2.4)
├── log4js@0.6.14 (semver@1.1.4, async@0.1.15, readable-stream@1.0.27-1)
├── http-proxy@0.10.4 (pkginfo@0.3.0, utile@0.2.1)
├── chokidar@0.8.2 (recursive-readdir@0.0.2, fsevents@0.2.0)
├── 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, bytes@0.2.1, qs@0.6.6, 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)
└── socket.io@0.9.17 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16)
如果我随后尝试在终端中键入karma
来执行业力,则会得到command not found: karma
,这表明尚未安装.在上面的输出中查看,有一个错误:(node-gyp rebuild 2> builderror.log) || (exit 0)
.我在/usr/local/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log
中找到了builderror.log,但是它是空的. find
找不到任何其他builderror.log文件.你知道还有什么地方吗?
If I then try to execute karma by typing karma
in the terminal, I get command not found: karma
which suggests that it hasn't been installed. Looking in the output above, there is an error: (node-gyp rebuild 2> builderror.log) || (exit 0)
. I've found builderror.log in /usr/local/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log
, however, it is empty. find
couldn't find any other builderror.log files. Do you know where else to look?
我尝试过:
-
npm update
-
npm install karma
-
sudo npm install karma
-
sudo npm install -g karma
npm update
npm install karma
sudo npm install karma
sudo npm install -g karma
我还应该尝试什么?
推荐答案
似乎正在安装.我不认为这是因为从命令行运行业力无法正常工作.但是,为了从命令行运行它,您需要安装karma-cli:npm install -g karma-cli
It seems that it was installing. I didn't think it was because running karma from the command line didn't work. However, in order to run it from the command line you need to install karma-cli: npm install -g karma-cli
感谢@ peter-lyons给出的答案- https://stackoverflow.com/a/23044629/211560
Thanks to @peter-lyons for this answer - https://stackoverflow.com/a/23044629/211560
这篇关于安装Karma时,node-gyp rebuild 2错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!