Node-red-contrib-generic-ble

#1

Hello,

I hope someone can help. Firstly I am a complete novice where Node-red is concerned :slightly_smiling_face:

I would like to build a project that scans for particular BLE information (probably "localName") and then trigger a relay, this will be to open gates.

I have loaded Node-Red v 0.19.5 and then npm install node-red-contrib-generic-ble. When I log onto my Node-red page- LAN IP address:1880 and open pallets I can see the "contrib-generic-ble" node, but it has a red warning triangle with a ! inside and does not appear on the left hand side node listing.

Any assistance as to overcome this would be greatly appreciated.

Peter!

node%20red%20error|659x177

0 Likes

#2

if you installed from the command line, what did the logs say?
When you restart node-red what messages are displayed in the log on startup?

You also don't mention what platform you are installing Node-RED on.

0 Likes

#3

Sorry, I should have said that this is running on a raspberry Pi 3B. This is what I get when I start node-red;

pi@raspberrypi:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.133:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
Started Node-RED graphical event wiring tool.
5 Jan 10:59:02 - [info]
Welcome to Node-RED

5 Jan 10:59:02 - [info] Node-RED version: v0.19.5
5 Jan 10:59:02 - [info] Node.js version: v10.15.0
5 Jan 10:59:02 - [info] Linux 4.14.79-v7+ arm LE
5 Jan 10:59:03 - [info] Loading palette nodes
5 Jan 10:59:06 - [warn] ------------------------------------------------------
5 Jan 10:59:06 - [warn] [node-red-contrib-generic-ble/generic-ble] Error: Cannot find module 'bluetooth-hci-socket'
5 Jan 10:59:06 - [warn] ------------------------------------------------------
5 Jan 10:59:06 - [info] Settings file : /home/pi/.node-red/settings.js
5 Jan 10:59:06 - [info] Context store : 'default' [module=memory]
5 Jan 10:59:06 - [info] User directory : /home/pi/.node-red
5 Jan 10:59:06 - [warn] Projects disabled : editorTheme.projects.enabled=false
5 Jan 10:59:06 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
5 Jan 10:59:06 - [info] Creating new flow file
5 Jan 10:59:06 - [warn]

Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

5 Jan 10:59:06 - [info] Starting flows
5 Jan 10:59:06 - [info] Started flows
5 Jan 10:59:06 - [info] Server now running at http://127.0.0.1:1880/
pi@raspberrypi:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.133:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
Started Node-RED graphical event wiring tool.
5 Jan 10:59:02 - [info]
Welcome to Node-RED

5 Jan 10:59:02 - [info] Node-RED version: v0.19.5
5 Jan 10:59:02 - [info] Node.js version: v10.15.0
5 Jan 10:59:02 - [info] Linux 4.14.79-v7+ arm LE
5 Jan 10:59:03 - [info] Loading palette nodes
5 Jan 10:59:06 - [warn] ------------------------------------------------------
5 Jan 10:59:06 - [warn] [node-red-contrib-generic-ble/generic-ble] Error: Cannot find module 'bluetooth-hci-socket'
5 Jan 10:59:06 - [warn] ------------------------------------------------------
5 Jan 10:59:06 - [info] Settings file : /home/pi/.node-red/settings.js
5 Jan 10:59:06 - [info] Context store : 'default' [module=memory]
5 Jan 10:59:06 - [info] User directory : /home/pi/.node-red
5 Jan 10:59:06 - [warn] Projects disabled : editorTheme.projects.enabled=false
5 Jan 10:59:06 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
5 Jan 10:59:06 - [info] Creating new flow file
5 Jan 10:59:06 - [warn]

Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

5 Jan 10:59:06 - [info] Starting flows
5 Jan 10:59:06 - [info] Started flows
5 Jan 10:59:06 - [info] Server now running at http://127.0.0.1:1880/

0 Likes

#4

explains why it is not showing up in the left handside list.

Try reinstalling it on the command line and copy the messages here (after reading the readme)

0 Likes

#5

Ok, so this is what I get with I run the install again;

pi@raspberrypi:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.133:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
Started Node-RED graphical event wiring tool.
5 Jan 10:59:02 - [info]
Welcome to Node-RED

5 Jan 10:59:02 - [info] Node-RED version: v0.19.5
5 Jan 10:59:02 - [info] Node.js version: v10.15.0
5 Jan 10:59:02 - [info] Linux 4.14.79-v7+ arm LE
5 Jan 10:59:03 - [info] Loading palette nodes
5 Jan 10:59:06 - [warn] ------------------------------------------------------
5 Jan 10:59:06 - [warn] [node-red-contrib-generic-ble/generic-ble] Error: Cannot find module 'bluetooth-hci-socket'
5 Jan 10:59:06 - [warn] ------------------------------------------------------
5 Jan 10:59:06 - [info] Settings file : /home/pi/.node-red/settings.js
5 Jan 10:59:06 - [info] Context store : 'default' [module=memory]
5 Jan 10:59:06 - [info] User directory : /home/pi/.node-red
5 Jan 10:59:06 - [warn] Projects disabled : editorTheme.projects.enabled=false
5 Jan 10:59:06 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
5 Jan 10:59:06 - [info] Creating new flow file
5 Jan 10:59:06 - [warn]

Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

5 Jan 10:59:06 - [info] Starting flows
5 Jan 10:59:06 - [info] Started flows
5 Jan 10:59:06 - [info] Server now running at http://127.0.0.1:1880/

^C
pi@raspberrypi:~ $ node-red-stop

Stop Node-RED

Use node-red-start to start Node-RED again

pi@raspberrypi:~ [node-red-contrib-generic-ble/generic-ble] Error: Cannot find module 'bluetooth-hci-socket' -bash: [node-red-contrib-generic-ble/generic-ble]: No such file or directory pi@raspberrypi:~ cd ~/.node-red
pi@raspberrypi:~/.node-red clear pi@raspberrypi:~/.node-red sudo npm install node-red-contrib-generic-ble

usb@1.5.0 install /home/pi/.node-red/node_modules/usb
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for usb@1.5.0 and node@10.15.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.15.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/.node-red/node_modules/usb/build'
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/.node-red/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/pi/.node-red/node_modules/usb/src/binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /home/pi/.node-red/node_modules/usb
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/.node-red/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/.node-red/node_modules/usb/src/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/pi/.node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Linux 4.14.79-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/.node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/.node-red/node_modules/usb
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/.node-red/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/.node-red/node_modules/usb/src/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)

bluetooth-hci-socket@0.5.1 install /home/pi/.node-red/node_modules/bluetooth-hci-socket
node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.15.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/.node-red/node_modules/bluetooth-hci-socket/build'
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/bluetooth-hci-socket
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4 (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.5.0 (node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.5.0 install: node-pre-gyp install --fallback-to-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 (node_modules/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • node-red-contrib-generic-ble@3.0.0
    updated 1 package and audited 970 packages in 26.004s
    found 1 low severity vulnerability
    run npm audit fix to fix them, or npm audit for details
    pi@raspberrypi:~/.node-red $
0 Likes

#6

You aren't using the correct command to install the module. Try reading the README again and follow the suggested command.

0 Likes

#7

Hi,

Ok, I give in, I have followed the process in the README and still the node does not appear.

I am very very new to this, so it would be appreciated if you could point me to the process you recommend I follow.

I do appreciate your help, but as I said I am new to this and finding my feet.

Thanks

Peter

0 Likes

#8

Taken from the nodes README

This is not the command you ran. At least some of the issues are caused by the command you used.

But you are also using node v10 which may or may not be causing other issues. ( the recommended version is as per https://nodered.org/docs/getting-started/installation

If you are very new to this I would suggest starting again and follow the installation instructions on the raspberry pi page https://nodered.org/docs/hardware/raspberrypi which will probably save you more pain later.

and never use sudo unless the instructions say you need to.

0 Likes

#9

Ok,

I did a complete reinstall following the README instructions to the letter. Unfortunately the problem still exits. I am at a loss as to what to do next :frowning:

Peter

0 Likes

#10

Then post the log you get when you try to install the node (including the command you used) and the startup log when you restart Node-RED.

0 Likes

#11

So I have done a complete rebuild, as below;

Loaded 2018-06-27 Raspian Lite
Ran - sudo apt-get update
Ran - Sudo apt-get upgrade
Followed instructions on - https://nodered.org/docs/hardware/raspberrypi
Ran - bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
Ran - node -v (confirmed V10.15.0 loaded)
Ran - npm -v (confirmed v 6.5.0 loaded)
Ran - cd ~/.node-red
Ran - npm rebuild
Ran - npm ls --depth=0
Ran - cd ~/.node-red
Ran - npm install node-red-contrib-generic-ble

The output from loading nodejs and node red is;

spbian-deb-package/master/resources/update-nodejs-and-nodered)

Stop Node-RED :heavy_check_mark:
Remove old version of Node-RED :heavy_check_mark:
Remove old version of Node.js :heavy_check_mark:
Install Node.js LTS :heavy_check_mark: Node v10.15.0 Npm 6.5.0
Clean npm cache :heavy_check_mark:
Install Node-RED core :heavy_check_mark: 0.19.5
Move global nodes to local -
Install extra Pi nodes :heavy_check_mark:
Npm rebuild existing nodes -
Add shortcut commands :heavy_check_mark:
Update systemd script :heavy_check_mark:

Any errors will be logged to /var/log/nodered-install.log

All done.
You can now start Node-RED with the command node-red-start
or using the icon under Menu / Programming / Node-RED
Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started Sun 6 Jan 09:48:11 UTC 2019 - Finished Sun 6 Jan 09:51:45 UTC 2019

pi@raspberrypi:~ $ Running Node-RED install for user pi at /home/pi

The output is;
kind-of@6.0.2 /home/pi/.node-red/node_modules/is-accessor-descriptor/node_modules/kind-of

is-data-descriptor@1.0.0 /home/pi/.node-red/node_modules/is-data-descriptor

kind-of@6.0.2 /home/pi/.node-red/node_modules/is-data-descriptor/node_modules/kind-of

kind-of@6.0.2 /home/pi/.node-red/node_modules/is-descriptor/node_modules/kind-of

kind-of@5.1.0 /home/pi/.node-red/node_modules/prompt-question/node_modules/kind-of

prompt-choices@4.1.0 /home/pi/.node-red/node_modules/prompt-choices

arr-flatten@1.1.0 /home/pi/.node-red/node_modules/arr-flatten

arr-swap@1.0.1 /home/pi/.node-red/node_modules/arr-swap

is-number@3.0.0 /home/pi/.node-red/node_modules/arr-swap/node_modules/is-number

choices-separator@2.0.0 /home/pi/.node-red/node_modules/choices-separator

debug@2.6.9 /home/pi/.node-red/node_modules/choices-separator/node_modules/debug

ms@2.0.0 /home/pi/.node-red/node_modules/choices-separator/node_modules/ms

strip-color@0.1.0 /home/pi/.node-red/node_modules/strip-color

clone-deep@4.0.1 /home/pi/.node-red/node_modules/prompt-choices/node_modules/clone-deep

kind-of@6.0.2 /home/pi/.node-red/node_modules/prompt-choices/node_modules/kind-of

shallow-clone@3.0.0 /home/pi/.node-red/node_modules/prompt-choices/node_modules/shallow-clone

collection-visit@1.0.0 /home/pi/.node-red/node_modules/collection-visit

map-visit@1.0.0 /home/pi/.node-red/node_modules/map-visit

object-visit@1.0.1 /home/pi/.node-red/node_modules/object-visit

define-property@2.0.2 /home/pi/.node-red/node_modules/prompt-choices/node_modules/define-property

is-number@6.0.0 /home/pi/.node-red/node_modules/is-number

pointer-symbol@1.0.0 /home/pi/.node-red/node_modules/pointer-symbol

radio-symbol@2.0.0 /home/pi/.node-red/node_modules/radio-symbol

set-value@3.0.0 /home/pi/.node-red/node_modules/set-value

terminal-paginator@2.0.2 /home/pi/.node-red/node_modules/terminal-paginator

debug@2.6.9 /home/pi/.node-red/node_modules/terminal-paginator/node_modules/debug

ms@2.0.0 /home/pi/.node-red/node_modules/terminal-paginator/node_modules/ms

extend-shallow@2.0.1 /home/pi/.node-red/node_modules/extend-shallow

toggle-array@1.0.1 /home/pi/.node-red/node_modules/toggle-array

readline-ui@2.2.3 /home/pi/.node-red/node_modules/readline-ui

debug@2.6.9 /home/pi/.node-red/node_modules/readline-ui/node_modules/debug

ms@2.0.0 /home/pi/.node-red/node_modules/readline-ui/node_modules/ms

readline-utils@2.2.3 /home/pi/.node-red/node_modules/readline-utils

is-number@3.0.0 /home/pi/.node-red/node_modules/readline-utils/node_modules/is-number

mute-stream@0.0.7 /home/pi/.node-red/node_modules/mute-stream

window-size@1.1.1 /home/pi/.node-red/node_modules/window-size

is-number@3.0.0 /home/pi/.node-red/node_modules/window-size/node_modules/is-number

string-width@2.1.1 /home/pi/.node-red/node_modules/readline-ui/node_modules/string-width

is-fullwidth-code-point@2.0.0 /home/pi/.node-red/node_modules/readline-ui/node_modules/is-fullwidth-code-point

strip-ansi@4.0.0 /home/pi/.node-red/node_modules/readline-ui/node_modules/strip-ansi

ansi-regex@3.0.0 /home/pi/.node-red/node_modules/readline-ui/node_modules/ansi-regex

static-extend@0.1.2 /home/pi/.node-red/node_modules/static-extend

define-property@0.2.5 /home/pi/.node-red/node_modules/static-extend/node_modules/define-property

is-descriptor@0.1.6 /home/pi/.node-red/node_modules/static-extend/node_modules/is-descriptor

is-accessor-descriptor@0.1.6 /home/pi/.node-red/node_modules/static-extend/node_modules/is-accessor-descriptor

kind-of@3.2.2 /home/pi/.node-red/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of

is-data-descriptor@0.1.4 /home/pi/.node-red/node_modules/static-extend/node_modules/is-data-descriptor

kind-of@3.2.2 /home/pi/.node-red/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of

kind-of@5.1.0 /home/pi/.node-red/node_modules/static-extend/node_modules/kind-of

object-copy@0.1.0 /home/pi/.node-red/node_modules/object-copy

The output from running npm install node-red-contrib-generic-ble is;

> usb@1.5.0 install /home/pi/.node-red/node_modules/usb

> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download

node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz

node-pre-gyp WARN Pre-built binaries not found for usb@1.5.0 and node@10.15.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)

make: Entering directory '/home/pi/.node-red/node_modules/usb/build'

CC(target) Release/obj.target/libusb/libusb/libusb/core.o

CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o

CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o

CC(target) Release/obj.target/libusb/libusb/libusb/io.o

CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o

CC(target) Release/obj.target/libusb/libusb/libusb/sync.o

CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o

CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o

CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o

CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o

../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory

#include <libudev.h>

^

compilation terminated.

libusb.target.mk:138: recipe for target 'Release/obj.target/libusb/libusb/libusb/os/linux_udev.o' failed

make: *** [Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1

make: Leaving directory '/home/pi/.node-red/node_modules/usb/build'

gyp ERR! build error

gyp ERR! stack Error: make failed with exit code: 2

gyp ERR! stack at ChildProcess.onExit (/usr/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 Linux 4.14.50-v7+

gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/.node-red/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/pi/.node-red/node_modules/usb/src/binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"

gyp ERR! cwd /home/pi/.node-red/node_modules/usb

gyp ERR! node -v v10.15.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

node-pre-gyp ERR! build error

node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/.node-red/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/.node-red/node_modules/usb/src/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)

node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/.no

I suspect the problem lie with the version of nodejs being used, do you agree.

Thanks

Peter

0 Likes

#12

Hi @ttquattroman

The ble node depends on the usb npm module, which in turn needs some additional dependencies to be installed outside of npm's control.

Run

sudo apt-get install build-essential libudev-dev

To get the missing library, then retry the npm install.

0 Likes

#13

hi,

Thanks for the update, I did as you suggest, still the problem remains

Peter

0 Likes

#14

To save you a lot of trouble and to achieve a reliable solution, check this, my shared solution

https://discourse.nodered.org/t/presence-monitoring-using-bluetooth/5369

0 Likes

#15

I have the same problem.
Running RPI 3B+

Had not found a solution yet.

0 Likes

#16

To make sure there is no confusion tell us exactly what the problem you are seeing is.

0 Likes

#17

When I install it in MANAGE PALETTE node-red-contrib-generic-ble there is going something wrong:

Even if I follow the readme (https://flows.nodered.org/node/node-red-contrib-generic-ble) and install manually I can not use the module.

0 Likes

#18

Copy/paste what you see when you install manually. You can copy from the terminal using Ctrl-Shift-C

0 Likes

#19

13 Jan 17:19:12 - [info] Node-RED version: v0.19.5
13 Jan 17:19:12 - [info] Node.js version: v10.14.1
13 Jan 17:19:12 - [info] Linux 4.14.79-v7+ arm LE

These are the versions that I think are up to date.

pi@raspberrypi:~ cd ~/.node-red pi@raspberrypi:~/.node-red npm install node-red-contrib-generic-ble

usb@1.5.0 install /home/pi/.node-red/node_modules/usb
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for usb@1.5.0 and node@10.14.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Map '/home/pi/.node-red/node_modules/usb/build' wordt binnengegaan
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from ../../nan/nan_new.h:189:0,
from ../../nan/nan.h:222,
from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBasev8::StringObject::return_t Nan::imp::Factoryv8::StringObject::New(v8::Localv8::String)’:
../../nan/nan_implementation_12_inl.h:340:37: warning: ‘static v8::Localv8::Value v8::StringObject::New(v8::Localv8::String)’ is deprecated: Use Isolate* version [-Wdeprecated-declarations]
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:5053:37: note: declared here
static Local New(Local value));
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Localv8::Value)’:
../../nan/nan.h:1066:53: warning: ‘v8::Localv8::String v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Localv8::String string = from->ToString();
^
In file included from ../src/node_usb.h:12:0,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:10040:15: note: declared here
Local Value::ToString() const {
^~~~~
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../../nan/nan.h:1080:74: warning: ‘int v8::String::WriteUtf8(char*, int, int*, int) const’ is deprecated: Use Isolate* version [-Wdeprecated-declarations]
length_ = string->WriteUtf8(str_, static_cast(len), 0, flags);
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:2659:21: note: declared here
int WriteUtf8(char* buffer, int length = -1,
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE SetDebugLevel(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/node_usb.cc:99:73: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
if (info.Length() != 1 || !info[0]->IsUint32() || info[0]->Uint32Value() > 4) {
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:2477:47: note: declared here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc:103:53: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
libusb_set_debug(usb_context, info[0]->Uint32Value());
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:2477:47: note: declared here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc: In function ‘void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)’:
../src/node_usb.cc:151:58: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char*, int, v8::Localv8::Value*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../../nan/nan.h:1000:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/node_usb.cc: In function ‘v8::Localv8::Value libusbException(int)’:
../src/node_usb.cc:301:14: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
e->ToObject()->Set(Nan::New("errno").ToLocalChecked(), Nan::New(errorno));
^
In file included from ../src/node_usb.h:12:0,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
CXX(target) Release/obj.target/usb_bindings/src/device.o
In file included from ../../nan/nan_new.h:189:0,
from ../../nan/nan.h:222,
from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/device.cc:1:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBasev8::StringObject::return_t Nan::imp::Factoryv8::StringObject::New(v8::Localv8::String)’:
../../nan/nan_implementation_12_inl.h:340:37: warning: ‘static v8::Localv8::Value v8::StringObject::New(v8::Localv8::String)’ is deprecated: Use Isolate* version [-Wdeprecated-declarations]
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/device.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:5053:37: note: declared here
static Local New(Local value));
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/device.cc:1:
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Localv8::Value)’:
../../nan/nan.h:1066:53: warning: ‘v8::Localv8::String v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Localv8::String string = from->ToString();
^
In file included from ../src/node_usb.h:12:0,
from ../src/device.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:10040:15: note: declared here
Local Value::ToString() const {
^~~~~
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/device.cc:1:
../../nan/nan.h:1080:74: warning: ‘int v8::String::WriteUtf8(char*, int, int*, int) const’ is deprecated: Use Isolate* version [-Wdeprecated-declarations]
length_ = string->WriteUtf8(str_, static_cast(len), 0, flags);
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/device.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:2659:21: note: declared here
int WriteUtf8(char* buffer, int length = -1,
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/device.cc: In static member function ‘static void Req::default_after(uv_work_t*)’:
../src/device.cc:237:64: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/device.cc:1:
../../nan/nan.h:958:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
CXX(target) Release/obj.target/usb_bindings/src/transfer.o
In file included from ../../nan/nan_new.h:189:0,
from ../../nan/nan.h:222,
from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/transfer.cc:1:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBasev8::StringObject::return_t Nan::imp::Factoryv8::StringObject::New(v8::Localv8::String)’:
../../nan/nan_implementation_12_inl.h:340:37: warning: ‘static v8::Localv8::Value v8::StringObject::New(v8::Localv8::String)’ is deprecated: Use Isolate* version [-Wdeprecated-declarations]
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/transfer.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:5053:37: note: declared here
static Local New(Local value));
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/transfer.cc:1:
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Localv8::Value)’:
../../nan/nan.h:1066:53: warning: ‘v8::Localv8::String v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Localv8::String string = from->ToString();
^
In file included from ../src/node_usb.h:12:0,
from ../src/transfer.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:10040:15: note: declared here
Local Value::ToString() const {
^~~~~
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/transfer.cc:1:
../../nan/nan.h:1080:74: warning: ‘int v8::String::WriteUtf8(char*, int, int*, int) const’ is deprecated: Use Isolate* version [-Wdeprecated-declarations]
length_ = string->WriteUtf8(str_, static_cast(len), 0, flags);
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/transfer.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:2659:21: note: declared here
int WriteUtf8(char* buffer, int length = -1,
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/transfer.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Transfer_Submit(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/transfer.cc:58:47: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local buffer_obj = info[0]->ToObject();
^
In file included from ../src/node_usb.h:12:0,
from ../src/transfer.cc:1:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/transfer.cc: In function ‘void handleCompletion(Transfer*)’:
../src/transfer.cc:126:72: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/transfer.cc:1:
../../nan/nan.h:958:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
COPY Release/usb_bindings.node
COPY /home/pi/.node-red/node_modules/usb/src/binding/usb_bindings.node
TOUCH Release/obj.target/action_after_build.stamp
make: Map '/home/pi/.node-red/node_modules/usb/build' wordt verlaten

bluetooth-hci-socket@0.5.1 install /home/pi/.node-red/node_modules/bluetooth-hci-socket
node-gyp rebuild

make: Map '/home/pi/.node-red/node_modules/bluetooth-hci-socket/build' wordt binnengegaan
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
In file included from ../../nan/nan_new.h:189:0,
from ../../nan/nan.h:222,
from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBasev8::StringObject::return_t Nan::imp::Factoryv8::StringObject::New(v8::Localv8::String)’:
../../nan/nan_implementation_12_inl.h:340:37: warning: ‘static v8::Localv8::Value v8::StringObject::New(v8::Localv8::String)’ is deprecated: Use Isolate* version [-Wdeprecated-declarations]
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from /home/pi/.node-gyp/10.14.1/include/node/node.h:63,
from /home/pi/.node-gyp/10.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:5053:37: note: declared here
static Local New(Local value));
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Localv8::Value)’:
../../nan/nan.h:1066:53: warning: ‘v8::Localv8::String v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Localv8::String string = from->ToString();
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/node.h:63:0,
from /home/pi/.node-gyp/10.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:10040:15: note: declared here
Local Value::ToString() const {
^~~~~
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:1080:74: warning: ‘int v8::String::WriteUtf8(char*, int, int*, int) const’ is deprecated: Use Isolate* version [-Wdeprecated-declarations]
length_ = string->WriteUtf8(str_, static_cast(len), 0, flags);
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from /home/pi/.node-gyp/10.14.1/include/node/node.h:63,
from /home/pi/.node-gyp/10.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:2659:21: note: declared here
int WriteUtf8(char* buffer, int length = -1,
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value*)’ is deprecated [-Wdeprecated-declarations]
back(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:979:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Localv8::Value [1])’
Local error = errorConstructor->NewInstance(1, constructorArgs);
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/node.h:63:0,
from /home/pi/.node-gyp/10.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context, int, v8::Localv8::Value) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/home/pi/.node-gyp/10.14.1/include/node/v8.h:3993:44: note: candidate expects 3 arguments, 2 provided
/home/pi/.node-gyp/10.14.1/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/home/pi/.node-gyp/10.14.1/include/node/v8.h:3996:44: note: candidate expects 1 argument, 2 provided
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value
)’ is deprecated [-Wdeprecated-declarations]
back(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:979:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:395:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from /home/pi/.node-gyp/10.14.1/include/node/node.h:63,
from /home/pi/.node-gyp/10.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:2476:46: note: declared here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:417:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
In file included from /home/pi/.node-gyp/10.14.1/include/node/v8.h:26:0,
from /home/pi/.node-gyp/10.14.1/include/node/node.h:63,
from /home/pi/.node-gyp/10.14.1/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.14.1/include/node/v8.h:2476:46: note: declared here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/home/pi/.node-gyp/10.14.1/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
binding.target.mk:99: recept voor doel 'Release/obj.target/binding/src/BluetoothHciSocket.o' is mislukt
make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Fout 1
make: Map '/home/pi/.node-red/node_modules/bluetooth-hci-socket/build' wordt verlaten
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/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 Linux 4.14.79-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/bluetooth-hci-socket
gyp ERR! node -v v10.14.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4 (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 (node_modules/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • node-red-contrib-generic-ble@3.0.0
    added 9 packages from 64 contributors and audited 3508 packages in 71.874s
    found 2 low severity vulnerabilities
    run npm audit fix to fix them, or npm audit for details
0 Likes

#20

Looking at this [1] it seems that the node is not compatible with node.js 10 yet. There are some workarounds in that thread or you can downgrade to node 8. I don't think node 10 is recommended for node-RED yet.

[1] https://github.com/noble/node-bluetooth-hci-socket/issues/84

0 Likes