1

我刚刚遇到了 milewise/node-soap,当我运行 npm install soap 时,它失败并出现以下错误:

sudo npm install soap
npm http GET https://registry.npmjs.org/soap
npm http 304 https://registry.npmjs.org/soap
npm http GET https://registry.npmjs.org/node-expat
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/cookie-jar
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/form-data

> node-expat@2.0.0 install /Users/rrazavipour-lp/node_modules/soap/node_modules/node-expat
> node-gyp rebuild

npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz
npm http GET https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz
npm http GET https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz
npm http 304 https://registry.npmjs.org/aws-sign
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/cookie-jar
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/cookie-jar/-/cookie-jar-0.3.0.tgz
npm http GET https://registry.npmjs.org/mime/-/mime-1.2.11.tgz
gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack     at Object.oncomplete (fs.js:107:15)
gyp ERR! System Darwin 12.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rrazavipour-lp/node_modules/soap/node_modules/node-expat
gyp ERR! node -v v0.10.13
gyp ERR! node-gyp -v v0.10.2
gyp ERR! not ok 
unbuild node-expat@2.0.0
unbuild soap@0.2.7
npm ERR! weird error 1
npm http 200 https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz
npm http 200 https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz
npm http 200 https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz
npm http 200 https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz
unbuild request@2.27.0
npm http 200 https://registry.npmjs.org/cookie-jar/-/cookie-jar-0.3.0.tgz
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.11.tgz
npm ERR! not ok code 0
Rezas-MacBook-Pro:node_modules rrazavipour-lp$ 

是什么导致失败?

4

1 回答 1

1

是的,您的系统似乎缺少make您。你安装了xcode command line tools吗?

这应该make为您安装和其他有用的开发工具。

这是与安装 xcode CLI 工具相关的另一个 SO 问题 :: Xcode 4.4 及更高版本安装命令行工具

于 2013-09-16T23:59:26.480 回答