npm install level 時にエラー
$npm install -save level ... ... ... In file included from ../src/batch.cc:5: ../node_modules/nan/nan.h:680:46: error: call to non-static member function without an object argument return NanPersistentToLocal(handle)->Get(NanSymbol("callback")) ^~~~~~~~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:159:38: note: expanded from macro 'NanSymbol' #define NanSymbol(value) v8::String::NewSymbol(value) ~~~~~~~~~~~~^~~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [Release/obj.target/leveldown/src/batch.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.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1059:12) gyp ERR! System Darwin 14.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/koya/dev/nakama-player/node_modules/leveldown gyp ERR! node -v v0.11.14 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Darwin 14.0.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "levelup" "leveldown@0.10" npm ERR! node v0.11.14 npm ERR! npm v2.1.14 npm ERR! code ELIFECYCLE npm ERR! leveldown@0.10.2 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the leveldown@0.10.2 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the leveldown 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 leveldown npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /Users/koya/dev/nakama-player/npm-debug.log
どうやらnodeのバージョンが悪いらしい
$node -v v0.11.14 $nodebrew install stable $nodebrew list v0.10.35 v0.11.14 current: v0.10.35 $nodebrew use v0.10.35 $node -v v0.10.35
改めて
$npm install -save level
これでok