2016-12-20 2 views
0

Ich wollte this page folgen, um JSBin lokal auszuführen."node-gyp rebuild" Fehler in Mac

Ich habe gerade xcode 8.2 in meinem Mac installiert. Jetzt gibt npm -v3.10.9 zurück; node -v gibt v7.2.1 zurück. Allerdings npm install Fehler angesprochen:

/Users/softtimur/Startup/WebProjects/jsbin$ npm install 

> [email protected] install /Users/softtimur/Startup/WebProjects/jsbin/node_modules/hashring 
> node-gyp rebuild 

    CXX(target) Release/obj.target/hashvalue/src/hashvalue.o 
In file included from ../src/hashvalue.cc:1: 
../../nan/nan.h:189:68: error: too many arguments to function call, expected at most 2, have 4 
    return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv); 
... 
... 
... 
... 
fatal error: too many errors emitted, stopping now [-ferror-limit=] 
13 warnings and 20 errors generated. 
make: *** [Release/obj.target/hashvalue/src/hashvalue.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:276:23) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:191:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 
gyp ERR! System Darwin 16.1.0 
gyp ERR! command "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /Users/softtimur/Startup/WebProjects/jsbin/node_modules/hashring 
gyp ERR! node -v v7.2.1 
gyp ERR! node-gyp -v v3.4.0 
gyp ERR! not ok 
npm WARN [email protected] requires a peer of [email protected]>= 1.1.0-beta3 but none was installed. 
npm ERR! Darwin 16.1.0 
npm ERR! argv "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/bin/npm" "install" 
npm ERR! node v7.2.1 
npm ERR! npm v3.10.9 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the hashring 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 information on how to open an issue for this project with: 
npm ERR!  npm bugs hashring 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls hashring 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/softtimur/Startup/WebProjects/jsbin/npm-debug.log 

Weiß jemand, was hier los?

Antwort

0

Das Problem ist, dass hashring v3.0.0 depends on an older version of nan (v1.3.x), die nicht mit den neuesten Versionen von Knoten kompatibel ist. Es sollte angemerkt werden, dass zum jetzigen Zeitpunkt die aktuelle Version von hashring (v3.2.0) kein Addon mehr enthält, sondern nur JavaScript.

Die hashring Abhängigkeit kommt von jsbinmemcached Abhängigkeit, die derzeit hart zu einem bestimmten Git Commit Hash codiert ist. Es gab a PR to update this dependency eine Anzahl von Monaten, aber wurde anscheinend entlassen, weil die Maintainer anscheinend nicht interessiert sind, moderne Versionen des Knotens zu stützen. Möglicherweise möchten Sie ein Problem unter their tracker erstellen, um Ihre Bedenken bezüglich der Knotenkompatibilität zu äußern.

+0

Was soll ich tun? Wie kann ich 'hashring v3.2.0' anstelle von' v3.0.0' verwenden? – SoftTimur

+0

Ich habe meine Antwort mit einigen weiteren Informationen aktualisiert. – mscdex