Unable to install node-red-contrib-modbus

Hi guys,

I'm having issues getting this installed and have ran out of ideas on how to get it to work. So far I've tried a complete reinstall, setting NODE_TLS_REJECT_UNAUTHORIZED=0, tried a manual installation. Nothing seems to be working and unsure what I'm missing.

System info:
Raspbian GNU/Linux 11 (bullseye)
RaspberryPi 3B+
Node Version: v16.16.0
Node Red Version: 3.0.2

Tried in the /home/pi/.node-red/node_modules same results.

npm install --unsafe-perm --build-from-source node-red-contrib-modbus
2022-08-11T04:36:24.382Z Install : node-red-contrib-modbus 5.23.1

2022-08-11T04:36:24.701Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-modbus@5.23.1
2022-08-11T04:36:26.730Z [err] npm
2022-08-11T04:36:26.732Z [err]  
2022-08-11T04:36:26.732Z [err] WARN config production Use `--omit=dev` instead.
2022-08-11T04:36:53.597Z [err] npm
2022-08-11T04:36:53.598Z [err]  ERR! code 1
2022-08-11T04:36:53.599Z [err] npm 
2022-08-11T04:36:53.599Z [err] ERR! path /home/pi/.node-red/node_modules/@serialport/bindings
2022-08-11T04:36:53.606Z [err] npm ERR!
2022-08-11T04:36:53.607Z [err]  command failed
2022-08-11T04:36:53.607Z [err] npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2022-08-11T04:36:53.608Z [err] npm ERR! prebuild-install warn install No prebuilt binaries found (target=16.16.0 runtime=node arch=arm libc= platform=linux)
2022-08-11T04:36:53.608Z [err] npm ERR! gyp info it worked if it ends with ok
2022-08-11T04:36:53.608Z [err] npm ERR! gyp info using node-gyp@9.0.0
2022-08-11T04:36:53.608Z [err] npm ERR! gyp info using node@16.16.0 | linux | arm
2022-08-11T04:36:53.608Z [err] npm 
2022-08-11T04:36:53.608Z [err] ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
2022-08-11T04:36:53.609Z [err] npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
2022-08-11T04:36:53.609Z [err] npm ERR! gyp WARN install got an error, rolling back install
2022-08-11T04:36:53.609Z [err] npm ERR! gyp ERR! configure error 
2022-08-11T04:36:53.609Z [err] npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz failed, reason: read ECONNRESET
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! stack     at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! stack     at ClientRequest.emit (node:events:527:28)
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! stack     at TLSSocket.socketErrorListener (node:_http_client:454:9)
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! stack     at TLSSocket.emit (node:events:539:35)
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! stack     at emitErrorNT (node:internal/streams/destroy:157:8)
2022-08-11T04:36:53.610Z [err] npm
2022-08-11T04:36:53.610Z [err]  ERR! gyp ERR! stack     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! System Linux 5.15.32-v7+
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2022-08-11T04:36:53.610Z [err] npm ERR!
2022-08-11T04:36:53.610Z [err]  gyp ERR! cwd /home/pi/.node-red/node_modules/@serialport/bindings
2022-08-11T04:36:53.610Z [err] npm ERR! gyp ERR! node -v v16.16.0
2022-08-11T04:36:53.610Z [err] npm 
2022-08-11T04:36:53.611Z [err] ERR! gyp ERR! node-gyp -v v9.0.0
2022-08-11T04:36:53.611Z [err] npm ERR! gyp ERR! not ok
2022-08-11T04:36:53.619Z [err] 
2022-08-11T04:36:53.620Z [err] npm 
2022-08-11T04:36:53.620Z [err] ERR! A complete log of this run can be found in:
2022-08-11T04:36:53.620Z [err] npm ERR!     /home/pi/.npm/_logs/2022-08-11T04_36_26_620Z-debug-0.log
2022-08-11T04:36:53.647Z rc=1

Any help is greatly appreciated.

Thanks

For some reason your internet connection to the link above failed

Hi @dceejay,

Thanks heaps for the assistance. I've just figured it out.

Thanks,
Park

Hi Everyone.
I am having same problem. Using win10 in laptop. Can anyone help ?
Installing modbus node while node red stop.
Logs are here:

image

PLEASE HELP.

I know it's been over a month, but I'll check in anyways. Did you ever get an answer to this? Also, is there a reason you're using NPM command line instead of Node-Red's built in pallette manager? I know for some there's the preference of it. But I'm just curious.

If you're having trouble installing it, try using an administrator command prompt instead of the regular one. Right click on your start menu to find it. Many of your problems might disappear by using it.

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