2013-11-14 5 views
7

System-Spezifikationen: Mac OS X 10.9 Knoten v0.10.22bcrypt nicht mit npm Installation (Mac OS X 10.9 - Knoten v0.10.22)

bekomme ich folgende Fehlermeldung, wenn bcrypt zu installieren versucht. Irgendwelche Tipps, wie Sie dieses Problem beheben können?

Jede Hilfe würde sehr geschätzt werden.

> [email protected] install /Users/eDawg/Desktop/eggstage/node_modules/bcrypt 
> node-gyp rebuild 

    CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o 
../src/blowfish.cc:47:10: fatal error: 'sys/types.h' file not found 
#include <sys/types.h> 
     ^
1 error generated. 
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.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: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/eDawg/Desktop/eggstage/node_modules/bcrypt 
gyp ERR! node -v v0.10.22 
gyp ERR! node-gyp -v v0.11.0 
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the bcrypt 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 bcrypt 
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" "bcrypt" 
npm ERR! cwd /Users/eDawg/Desktop/eggstage 
npm ERR! node -v v0.10.22 
npm ERR! npm -v 1.3.14 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/eDawg/Desktop/eggstage/npm-debug.log 
npm ERR! not ok code 0 
+0

Ich hatte das gleiche Problem für die letzten paar Wochen. Ich konnte bcrypt 0.7.7 erfolgreich von npm installieren mit Knoten v0.10.22 herunterladen. – BingeBoy

Antwort

2

würde ich vorschlagen, bcrypt.js zu versuchen, die in nativen Javascript geschrieben. Anscheinend sollte es keine Build-Probleme geben.

0

Updating XCode auf meinem Mac Mavericks 1.9 das für mich gelöst.

1

weiß, dass ich diese Antwort ziemlich spät ist. Aber für jeden, der dieses Problem hat, müssen Sie sicherstellen, dass Sie die richtige Version von bcrypt verwenden. Bitte beachten Sie die unten stehende Tabelle (die auch auf ihrem NPM page finden). Knotenversion auf der linken Seite und bcrypt Version auf der rechten Seite.

0.4.x <= 0.4.x 
0.6.x >= 0.5.x 
0.8.x >= 0.5.x 
0.10.x >= 0.5.x 
0.11.x >= 0.8.x