PunchThrough / node-red-contrib-bean

Node-Red nodes for the LightBlue Bean
23 stars 16 forks source link

Support for node v 0.12? #8

Closed jrydval closed 9 years ago

jrydval commented 9 years ago

Thank you for the module! I use it as a part of my home automation.

Do you plan to update the module for node v 0.12?

The node-red supports this version but (probably) due to a dependency on an older noble it seems impossible to install node-red-contrib-bean:

$ npm install node-red-contrib-bean
\
> xpc-connection@0.1.3 install /Users/Jan/Development/Node.js/Node-RED-test/node_modules/node-red-contrib-bean/node_modules/ble-bean/node_modules/noble/node_modules/xpc-connection
> node-gyp rebuild

  CXX(target) Release/obj.target/binding/src/XpcConnection.o
  SOLINK_MODULE(target) Release/binding.node

> noble@0.3.14 install /Users/Jan/Development/Node.js/Node-RED-test/node_modules/node-red-contrib-bean/node_modules/ble-bean/node_modules/noble
> node-gyp rebuild

  LINK(target) Release/hci-ble
Undefined symbols for architecture x86_64:
  "_main", referenced from:
      start in crt1.10.5.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/hci-ble] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "node" "/opt/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Jan/Development/Node.js/Node-RED-test/node_modules/node-red-contrib-bean/node_modules/ble-bean/node_modules/noble
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 14.5.0
npm ERR! argv "/opt/local/bin/node" "/opt/local/bin/npm" "install" "node-red-contrib-bean"
npm ERR! node v0.12.7
npm ERR! npm  v2.13.0
npm ERR! code ELIFECYCLE

npm ERR! noble@0.3.14 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the noble@0.3.14 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the noble 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 noble
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Jan/Development/Node.js/Node-RED-test/npm-debug.log
aderhgawen commented 9 years ago

@jrydval Hello there! I just tried installing the Bean node with Node v0.12.7 and Node-Red v0.11.1. I got some errors because noble failed to build. I installed the Linux dependencies for noble -

sudo apt-get install bluetooth bluez-utils libbluetooth-dev

Then, I installed the Bean nodes:

mkdir -p ~/.node-red/node_modules npm install --prefix ~/.node-red node-red-contrib-bean

That fixed the issue, and the Bean nodes installed successfully. Let me know if this resolves your issue. You can see the dependencies for Noble here - https://github.com/sandeepmistry/noble

jrydval commented 9 years ago

Thanks aderhgawen for the hint! Actually, the module works fine on my Raspberry - I have only problem with my Mac environment... I tried to modify dependencies to make it woking but it's not working reliable - at least I can install and compile all components... My understanding is that node-red-contrib-bean requires an older noble but that version cannot be compiled using node v0.12 on Mac.

Kind Regards, Jan

aderhgawen commented 9 years ago

Hey @jrydval, node-red-contrib-bean has been updated, and this version uses the latest version of noble. Let me know if this works! I don't have a mac to test if it works, but it is working fine on my Linux machine.