Rob-- / memoryjs

Read and write process memory in Node.js (Windows API functions exposed via Node bindings)
MIT License
636 stars 88 forks source link

Can't install in Macbook Pro // <windows.h> file not found #17

Closed leabdalla closed 6 years ago

leabdalla commented 6 years ago

Does this work in Mac?

I'm trying to install it and getting this errors:

$ npm install memoryjs

> memoryjs@2.1.0 install /Users/myuser/myproject/node_modules/memoryjs
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/memoryjs/lib/memoryjs.o
../lib/memoryjs.cc:2:10: fatal error: 'windows.h' file not found
#include <windows.h>
         ^~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/memoryjs/lib/memoryjs.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:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Darwin 17.6.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/myuser/myproject/node_modules/memoryjs
gyp ERR! node -v v8.1.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/myuser/myproject/package.json'
npm WARN dev-csgo No description
npm WARN dev-csgo No repository field.
npm WARN dev-csgo No README data
npm WARN dev-csgo No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! memoryjs@2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the memoryjs@2.1.0 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/myuser/.npm/_logs/2018-06-26T20_13_58_457Z-debug.log
$ 
Rob-- commented 6 years ago

Hi, nope this won't work on Mac. This library uses Windows specific APIs.