Sunoo / node-stagekit

RockBand StageKit API in NodeJS
GNU General Public License v2.0
0 stars 1 forks source link

Macintosh Support #1

Open kevinnewhouse opened 4 years ago

kevinnewhouse commented 4 years ago

Hello,

When I attempt to install via npm i stagekit, I receive an error. I'm on macOS 10.15.4 and tried with several different versions of node, including 10.16, 14.5.0, and 12.18.2. Here is my output from v12.18.2:

$ npm i stagekit

> stagekit@1.1.3 install <proj path>/node_modules/stagekit
> node-gyp rebuild

  CXX(target) Release/obj.target/stagekit-api/stagekit-api.o
../stagekit-api.cpp:53:5: error: use of undeclared identifier 'uint'; did you mean 'int'?
    uint left = info[0].As<Napi::Number>().Uint32Value();
    ^~~~
    int
../stagekit-api.cpp:54:5: error: use of undeclared identifier 'uint'; did you mean 'int'?
    uint right = info[1].As<Napi::Number>().Uint32Value();
    ^~~~
    int
../stagekit-api.cpp:110:5: error: use of undeclared identifier 'uint'; did you mean 'int'?
    uint speed = info[0].As<Napi::Number>().Uint32Value();
    ^~~~
    int
3 errors generated.
make: *** [Release/obj.target/stagekit-api/stagekit-api.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (<user path>/.nvm/versions/node/v12.18.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "<user path>/.nvm/versions/node/v12.18.2/bin/node" "<user path>/.nvm/versions/node/v12.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd <proj path>/node_modules/stagekit
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! stagekit@1.1.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the stagekit@1.1.3 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!    <user path>/.npm/_logs/2020-07-10T21_51_46_053Z-debug.log
Sunoo commented 4 years ago

I hadn’t tested it on anything besides Linux, but I have got a Mac. I’ll see if I can recreate this myself on that this weekend and figure out what’s going on.

Sunoo commented 4 years ago

Yea, I took a look at the code, and it’s definitely Linux specific. I’ll have to see if I can find out how to control game controller rumble on a Mac in order to support them.

kevinnewhouse commented 4 years ago

Thanks for the quick follow-up! To confirm, I just tried installing on a Ubuntu VM and it worked fine. My end goal is to use this code on a raspberry pi, so I bet I can use that as a workaround for now.

Sunoo commented 4 years ago

@kevinnewhouse Perfect, I actually developed this on a Raspberry Pi, so I can confirm it works fine on there. Just curious, but what are you planning to make with this?

kevinnewhouse commented 4 years ago

@Sunoo Basically, I'm hoping to be able to control my stage kit from an app on my phone through the raspberry pi. If I really get into it, I'd love to see if I can learn enough to integrate it with my Home Assistant setup, but baby steps :)

Sunoo commented 4 years ago

Good luck! I’d love to see what you make once you finish. I have no experience with Home Assistant, but I did make a plugin for HomeKit which might help as a starting point: https://github.com/Sunoo/homebridge-stagekit

kevinnewhouse commented 4 years ago

Thanks, I'll definitely check that out - I'll let you know once I have something to show for it!