2015-12-16 132 views
-1

我需要使用apiary來使用API​​。在安裝dredd之前,我已經安裝了Node和npm。npm install -g dredd在mac上失敗

現在,當我嘗試執行「故宮安裝-g的Dredd」 我獲得以下錯誤:

make: *** [Release/obj.target/protagonist/src/annotation.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:270:23) 
gyp ERR! stack  at emitTwo (events.js:88:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:173:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12) 
gyp ERR! System Darwin 14.5.0 
gyp ERR! command "/usr/local/bin/node"  "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /usr/local/lib/node_modules/dredd/node_modules/protagonist 
gyp ERR! node -v v5.2.0 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild` 
npm WARN install:[email protected] Exit status 1 

> [email protected] postinstall  /usr/local/lib/node_modules/dredd/node_modules/spawn-sync 
> node postinstall 

/usr/local/lib 
└── (empty) 

npm ERR! code 1 

能對此任何人的幫助?

+0

如果'make'失敗,則可能是您的系統上缺少一些(本機)庫。另外,根據論壇中的[評論](https://github.com/apiaryio/dredd/issues/297),'dredd'尚未在Node.js> 0.12上編譯。 – xaviert

回答

0

不幸的是,dredd與任何nodejs> = 4.0版本不兼容,但它絕對是我們的路線圖。

+0

你可以關注這個[github問題](https://github.com/apiaryio/dredd/issues/292) –

0

Dredd現在支持所有最新版本的Node。由於版本1.4.0在安裝過程中,Dredd也不需要C++編譯器或類似的東西。我希望你現在可以在沒有任何問題的情況下在Mac上安裝它!