Hello, I have tried to install node-red-contrib-usb-hid-relay with no success. I have tried with manage palette and this is the error code:

2021-11-22T18:32:10.807Z Install : node-red-contrib-usb-hid-relay 0.2.6

2021-11-22T18:32:11.272Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-usb-hid-relay@0.2.6
2021-11-22T18:32:26.226Z [out]
2021-11-22T18:32:26.226Z [out] > node-hid@0.7.9 install /data/node_modules/node-hid
2021-11-22T18:32:26.226Z [out] > prebuild-install || node-gyp rebuild
2021-11-22T18:32:26.226Z [out]
2021-11-22T18:32:27.242Z [err] prebuild-install
2021-11-22T18:32:27.242Z [err] WARN install No prebuilt binaries found (target=14.17.6 runtime=node arch=arm libc=musl platform=linux)
2021-11-22T18:32:29.451Z [out] make: Entering directory '/data/node_modules/node-hid/build'
2021-11-22T18:32:29.453Z [out] CC(target) Release/
2021-11-22T18:32:29.548Z [err] ../hidapi/linux/hid.c:44:10: fatal error: libudev.h: No such file or directory
2021-11-22T18:32:29.548Z [err] 44 | #include <libudev.h>
2021-11-22T18:32:29.548Z [err] | ^~~~~~~~~~~
2021-11-22T18:32:29.549Z [err] compilation terminated.
2021-11-22T18:32:29.558Z [err] make: *** [ Release/] Error 1
2021-11-22T18:32:29.558Z [out] make: Leaving directory '/data/node_modules/node-hid/build'
2021-11-22T18:32:29.561Z [err] gyp
2021-11-22T18:32:29.562Z [err]
2021-11-22T18:32:29.562Z [err] ERR! build error
2021-11-22T18:32:29.564Z [err] gyp
2021-11-22T18:32:29.564Z [err] ERR! stack Error: make failed with exit code: 2
2021-11-22T18:32:29.564Z [err] gyp ERR! stack
2021-11-22T18:32:29.564Z [err] at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
2021-11-22T18:32:29.564Z [err] gyp ERR!
2021-11-22T18:32:29.564Z [err] stack at ChildProcess.emit (events.js:400:28)
2021-11-22T18:32:29.564Z [err] gyp
2021-11-22T18:32:29.564Z [err] ERR! stack
2021-11-22T18:32:29.564Z [err] at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
2021-11-22T18:32:29.565Z [err] gyp
2021-11-22T18:32:29.565Z [err] ERR! System Linux 5.10.63-v7l+
2021-11-22T18:32:29.565Z [err] gyp ERR!
2021-11-22T18:32:29.565Z [err] command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-11-22T18:32:29.565Z [err] gyp
2021-11-22T18:32:29.567Z [err] ERR! cwd /data/node_modules/node-hid
2021-11-22T18:32:29.567Z [err] gyp ERR! node -v v14.17.6
2021-11-22T18:32:29.567Z [err] gyp ERR! node-gyp -v v5.1.0
2021-11-22T18:32:29.567Z [err] gyp ERR! not ok
2021-11-22T18:32:30.104Z [err] npm
2021-11-22T18:32:30.104Z [err]
2021-11-22T18:32:30.104Z [err] ERR!
2021-11-22T18:32:30.104Z [err]
2021-11-22T18:32:30.105Z [err] code
2021-11-22T18:32:30.105Z [err] ELIFECYCLE
2021-11-22T18:32:30.105Z [err] npm
2021-11-22T18:32:30.106Z [err]
2021-11-22T18:32:30.106Z [err] ERR!
2021-11-22T18:32:30.106Z [err]
2021-11-22T18:32:30.106Z [err] errno
2021-11-22T18:32:30.106Z [err] 1
2021-11-22T18:32:30.120Z [err] npm
2021-11-22T18:32:30.120Z [err]
2021-11-22T18:32:30.121Z [err] ERR!
2021-11-22T18:32:30.121Z [err] node-hid@0.7.9 install: prebuild-install || node-gyp rebuild
2021-11-22T18:32:30.121Z [err] npm
2021-11-22T18:32:30.121Z [err]
2021-11-22T18:32:30.121Z [err] ERR!
2021-11-22T18:32:30.122Z [err] Exit status 1
2021-11-22T18:32:30.122Z [err] npm
2021-11-22T18:32:30.122Z [err]
2021-11-22T18:32:30.122Z [err] ERR!
2021-11-22T18:32:30.122Z [err]
2021-11-22T18:32:30.122Z [err] npm
2021-11-22T18:32:30.123Z [err]
2021-11-22T18:32:30.123Z [err] ERR!
2021-11-22T18:32:30.123Z [err] Failed at the node-hid@0.7.9 install script.
2021-11-22T18:32:30.123Z [err] npm
2021-11-22T18:32:30.123Z [err]
2021-11-22T18:32:30.124Z [err] ERR!
2021-11-22T18:32:30.124Z [err] This is probably not a problem with npm. There is likely additional logging output above.
2021-11-22T18:32:30.148Z [err]
2021-11-22T18:32:30.148Z [err] npm
2021-11-22T18:32:30.148Z [err]
2021-11-22T18:32:30.148Z [err] ERR!
2021-11-22T18:32:30.149Z [err] A complete log of this run can be found in:
2021-11-22T18:32:30.149Z [err] npm
2021-11-22T18:32:30.149Z [err]
2021-11-22T18:32:30.149Z [err] ERR!
2021-11-22T18:32:30.149Z [err] /data/.npm/_logs/2021-11-22T18_32_30_134Z-debug.log
2021-11-22T18:32:30.167Z rc=1

Did you install the dependancies?

Yes, of course I did follow linux dependencies as well but I can't install the node

What device are you running NR on and what version of Node-RED and node.js are you using? (You can get these from the NR start up log)

We’re you in the .node-red folder when you installed the dependencies?

I want to use a usb hid relay, and my version of Node-Red is v1.3.4 and node.js is v10.24.0

well it would seem something is odd with your setup.... as that indicates the pre-reqs are not installed correctly... also

2021-11-22T18:32:27.242Z [err] WARN install No prebuilt binaries found (target=14.17.6 runtime=node arch=arm libc=musl platform=linux)

would tend to indicate it is trying to build for node14 not 10... so ???
Are you using something like n or nvm to load node in the first place ?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.