kyriosli / node-shared-cache

An interprocess shared LRU cache module for Node.JS
149 stars 30 forks source link

Install error on MacOS #16

Open garygchai opened 4 years ago

garygchai commented 4 years ago
npm i node-shared-cache -S

> node-shared-cache@1.6.2 install /Users/changhai.gch/study/egg-sse/node_modules/node-shared-cache
> node-gyp rebuild

  CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../src/binding.cc:1:
In file included from ../../nan/nan.h:190:
../../nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object'
  return obj->ForceSet(GetCurrentContext(), key, value, attribs);
...

37 warnings and 1 error generated.
make: *** [Release/obj.target/binding/src/binding.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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 18.7.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 /Users/changhai.gch/study/egg-sse/node_modules/node-shared-cache
gyp ERR! node -v v10.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-shared-cache@1.6.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-shared-cache@1.6.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/changhai.gch/.npm/_logs/2020-06-10T02_54_12_214Z-debug.log

MacOS 10.14.6 node version: v10.12.0 npm version: 6.4.1

What's the problem? How to fix? Pls help.

xinghengwang commented 4 years ago

https://codeforgeek.com/make-failed-with-exit-code-2/