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
Remove old version of Node-RED
Remove old version of Node.js
Install Node.js LTS Node v10.15.0 Npm 6.5.0
Clean npm cache
Install Node-RED core 0.19.5
Move global nodes to local -
Install extra Pi nodes
Npm rebuild existing nodes -
Add shortcut commands
Update systemd script
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