急求, npm安装soap时的问题.
发布于 11 年前 作者 jayceefun 8953 次浏览 最后一次编辑是 8 年前

gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System Darwin 13.0.0 gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild" gyp ERR! cwd /Users/fanjinchen/node_modules/soap/node_modules/node-expat gyp ERR! node -v v0.10.23 gyp ERR! node-gyp -v v0.12.1 gyp ERR! not ok npm ERR! node-expat@2.1.3 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-expat@2.1.3 install script. npm ERR! This is most likely a problem with the node-expat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls node-expat npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.0.0 npm ERR! command “node” “/usr/local/bin/npm” “install” "soap" npm ERR! cwd /Users/fanjinchen npm ERR! node -v v0.10.23 npm ERR! npm -v 1.3.17 npm ERR! code ELIFECYCLE

我google了两天, 之前也报了别的错误 发现每次都是gyp在build soap依赖的node-expat模块时失败, 这个库是用c++写的, 去github查了相关的issue, 说删掉.node_gyp文件夹, 试了无果. npm cache clean之后也一直安装失败. 再google, 说linux下要安装libexpat1-dev这个库, mac下要安装commandline tools 我使用的环境是Mac OS X 10.9 Node.js v0.10.23 Xcode的commandline tools也早就安装了, 可就是失败, npm最近很是抽风.

3 回复

小伙伴们, 如果方便的话可以试试在你们的机器上npm install一下这个模块, 我也试着用了以前下好build过的版本, 但是运行时还是会报错, 而且好像跟平台无关, 真是头疼了. 求帮助…T_T

试试讲node-gyp重新安装试试

$ cnpm install -g node-gyp
$ cnpm install soap

谢谢, 已经解决了, 下次遇到类似问题会用你的方法尝试一下:)

回到顶部