Problem with install node-red-contrib-modbus

Hello , please you can to help , I have this error And Not can to Install Modbus Contrib in a Raspberry , I have Node red 3.02

Thanks for you help

2022-09-06T16:18:56.830Z Install : node-red-contrib-modbus 5.23.1

2022-09-06T17:19:01.236Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-modbus@5.23.1
2022-09-06T17:19:02.352Z [err] npm
2022-09-06T17:19:02.353Z [err]
2022-09-06T17:19:02.353Z [err] WARN config production Use --omit=dev instead.
2022-09-06T17:19:23.077Z [err] npm
2022-09-06T17:19:23.077Z [err] ERR! code 1
2022-09-06T17:19:23.078Z [err] npm
2022-09-06T17:19:23.078Z [err] ERR! path /var/snap/node-red/828/node_modules/@serialport/bindings
2022-09-06T17:19:23.083Z [err] npm ERR!
2022-09-06T17:19:23.083Z [err] command failed
2022-09-06T17:19:23.083Z [err] npm ERR!
2022-09-06T17:19:23.083Z [err] command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2022-09-06T17:19:23.083Z [err] npm
2022-09-06T17:19:23.083Z [err] ERR! prebuild-install warn install No prebuilt binaries found (target=16.16.0 runtime=node arch=arm64 libc= platform=linux)
2022-09-06T17:19:23.083Z [err] npm ERR!
2022-09-06T17:19:23.083Z [err] gyp info it worked if it ends with ok
2022-09-06T17:19:23.083Z [err] npm ERR!
2022-09-06T17:19:23.084Z [err] gyp info using node-gyp@9.0.0
2022-09-06T17:19:23.084Z [err] npm ERR!
2022-09-06T17:19:23.084Z [err] gyp info using node@16.16.0 | linux | arm64
2022-09-06T17:19:23.084Z [err] npm ERR!
2022-09-06T17:19:23.084Z [err] gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3"
2022-09-06T17:19:23.084Z [err] npm
2022-09-06T17:19:23.084Z [err] ERR!
2022-09-06T17:19:23.084Z [err] gyp info spawn /usr/bin/python3
2022-09-06T17:19:23.085Z [err] npm ERR! gyp info spawn args [
2022-09-06T17:19:23.085Z [err] npm
2022-09-06T17:19:23.085Z [err] ERR! gyp info spawn args '/snap/node-red/828/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2022-09-06T17:19:23.085Z [err] npm ERR!
2022-09-06T17:19:23.085Z [err] gyp info spawn args 'binding.gyp',
2022-09-06T17:19:23.085Z [err] npm ERR!
2022-09-06T17:19:23.085Z [err] gyp info spawn args '-f',
2022-09-06T17:19:23.085Z [err] npm ERR! gyp info spawn args 'make',
2022-09-06T17:19:23.085Z [err] npm ERR! gyp info spawn args '-I',
2022-09-06T17:19:23.085Z [err] npm ERR! gyp info spawn args '/var/snap/node-red/828/node_modules/@serialport/bindings/build/config.gypi',
2022-09-06T17:19:23.085Z [err] npm ERR! gyp info spawn args '-I',
2022-09-06T17:19:23.085Z [err] npm ERR! gyp info spawn args '/snap/node-red/828/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2022-09-06T17:19:23.085Z [err] npm ERR!
2022-09-06T17:19:23.085Z [err] gyp info spawn args '-I',
2022-09-06T17:19:23.085Z [err] npm ERR!
2022-09-06T17:19:23.085Z [err] gyp info spawn args '/root/snap/node-red/828/.cache/node-gyp/16.16.0/include/node/common.gypi',
2022-09-06T17:19:23.085Z [err] npm ERR!
2022-09-06T17:19:23.086Z [err] gyp info spawn args '-Dlibrary=shared_library',
2022-09-06T17:19:23.086Z [err] npm ERR!
2022-09-06T17:19:23.086Z [err] gyp info spawn args '-Dvisibility=default',
2022-09-06T17:19:23.086Z [err] npm ERR!
2022-09-06T17:19:23.086Z [err] gyp info spawn args '-Dnode_root_dir=/root/snap/node-red/828/.cache/node-gyp/16.16.0',
2022-09-06T17:19:23.086Z [err] npm ERR! gyp info spawn args '-Dnode_gyp_dir=/snap/node-red/828/lib/node_modules/npm/node_modules/node-gyp',
2022-09-06T17:19:23.086Z [err] npm ERR! gyp info spawn args '-Dnode_lib_file=/root/snap/node-red/828/.cache/node-gyp/16.16.0/<(target_arch)/node.lib',
2022-09-06T17:19:23.086Z [err] npm ERR! gyp info spawn args '-Dmodule_root_dir=/var/snap/node-red/828/node_modules/@serialport/bindings',
2022-09-06T17:19:23.086Z [err] npm ERR!
2022-09-06T17:19:23.086Z [err] gyp info spawn args '-Dnode_engine=v8',
2022-09-06T17:19:23.086Z [err] npm ERR!
2022-09-06T17:19:23.086Z [err] gyp info spawn args '--depth=.',
2022-09-06T17:19:23.086Z [err] npm ERR!
2022-09-06T17:19:23.086Z [err] gyp info spawn args '--no-parallel',
2022-09-06T17:19:23.086Z [err] npm ERR!
2022-09-06T17:19:23.086Z [err] gyp info spawn args '--generator-output',
2022-09-06T17:19:23.086Z [err] npm ERR!
2022-09-06T17:19:23.086Z [err] gyp info spawn args 'build',
2022-09-06T17:19:23.086Z [err] npm ERR!
2022-09-06T17:19:23.087Z [err] gyp info spawn args '-Goutput_dir=.'
2022-09-06T17:19:23.087Z [err] npm ERR!
2022-09-06T17:19:23.087Z [err] gyp info spawn args ]
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.087Z [err] ERR! gyp ERR! build error
2022-09-06T17:19:23.087Z [err] npm ERR!
2022-09-06T17:19:23.087Z [err] gyp ERR! stack Error: not found: make
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.087Z [err] ERR! gyp ERR! stack at getNotFoundError (/snap/node-red/828/lib/node_modules/npm/node_modules/which/which.js:10:17)
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.087Z [err] ERR! gyp ERR! stack at /snap/node-red/828/lib/node_modules/npm/node_modules/which/which.js:57:18
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.087Z [err] ERR! gyp ERR! stack at new Promise ()
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.087Z [err] ERR! gyp ERR! stack at step (/snap/node-red/828/lib/node_modules/npm/node_modules/which/which.js:54:21)
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.087Z [err] ERR! gyp ERR! stack at /snap/node-red/828/lib/node_modules/npm/node_modules/which/which.js:71:22
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.087Z [err] ERR! gyp ERR! stack at new Promise ()
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.087Z [err] ERR! gyp ERR! stack at subStep (/snap/node-red/828/lib/node_modules/npm/node_modules/which/which.js:69:33)
2022-09-06T17:19:23.087Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! stack at /snap/node-red/828/lib/node_modules/npm/node_modules/which/which.js:80:22
2022-09-06T17:19:23.088Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! stack at /snap/node-red/828/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2022-09-06T17:19:23.088Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! stack at /snap/node-red/828/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2022-09-06T17:19:23.088Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! System Linux 5.4.0-1069-raspi
2022-09-06T17:19:23.088Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! command "/snap/node-red/828/bin/node" "/snap/node-red/828/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2022-09-06T17:19:23.088Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! cwd /var/snap/node-red/828/node_modules/@serialport/bindings
2022-09-06T17:19:23.088Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! node -v v16.16.0
2022-09-06T17:19:23.088Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! node-gyp -v v9.0.0
2022-09-06T17:19:23.088Z [err] npm
2022-09-06T17:19:23.088Z [err] ERR! gyp ERR! not ok
2022-09-06T17:19:23.093Z [err]
2022-09-06T17:19:23.093Z [err] npm
2022-09-06T17:19:23.094Z [err] ERR! A complete log of this run can be found in:
2022-09-06T17:19:23.094Z [err] npm ERR! /root/snap/node-red/828/.npm/_logs/2022-09-06T17_19_02_261Z-debug-0.log
2022-09-06T17:19:23.119Z rc=1

It looks like you have used snap to install node-red on the raspberry pi. This is likely related.

So I am wondering why did you not follow the official raspberry pi install?

Hey @Steve-Mcl
i tried to install Modbus on Ubuntu Server:

2022-10-19T08:42:20.594Z Installieren : node-red-contrib-modbus 5.23.2

2022-10-19T08:42:20.792Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-modbus@5.23.2
2022-10-19T08:42:21.982Z [err] npm
2022-10-19T08:42:21.983Z [err]  WARN
2022-10-19T08:42:21.983Z [err]  config production Use `--omit=dev` instead.
2022-10-19T08:42:30.226Z [err] npm
2022-10-19T08:42:30.226Z [err]  ERR!
2022-10-19T08:42:30.226Z [err]  code
2022-10-19T08:42:30.227Z [err]  1
2022-10-19T08:42:30.228Z [err] npm
2022-10-19T08:42:30.229Z [err]  
2022-10-19T08:42:30.230Z [err] ERR! 
2022-10-19T08:42:30.230Z [err] path /home/pi/.node-red/node_modules/@serialport/bindings
2022-10-19T08:42:30.239Z [err] npm ERR! command failed
2022-10-19T08:42:30.239Z [err] npm
2022-10-19T08:42:30.239Z [err]  ERR! command sh -c -- prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2022-10-19T08:42:30.241Z [err] npm ERR! prebuild-install warn install No prebuilt binaries found (target=18.11.0 runtime=node arch=x64 libc= platform=linux)
2022-10-19T08:42:30.241Z [err] npm ERR! gyp info it worked if it ends with ok
2022-10-19T08:42:30.241Z [err] npm ERR! gyp info using node-gyp@9.1.0
2022-10-19T08:42:30.241Z [err] npm ERR! gyp info using node@18.11.0 | linux | x64
2022-10-19T08:42:30.241Z [err] npm ERR!
2022-10-19T08:42:30.242Z [err]  gyp info find Python using Python version 3.10.6 found at "/usr/bin/python3"
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn /usr/bin/python3
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args [
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   'binding.gyp',
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   '-f',
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   'make',
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   '-I',
2022-10-19T08:42:30.242Z [err] npm
2022-10-19T08:42:30.242Z [err]  ERR! gyp info spawn args   '/home/pi/.node-red/node_modules/@serialport/bindings/build/config.gypi',
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   '-I',
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   '-I',
2022-10-19T08:42:30.242Z [err] npm ERR!
2022-10-19T08:42:30.242Z [err]  gyp info spawn args   '/home/pi/.cache/node-gyp/18.11.0/include/node/common.gypi',
2022-10-19T08:42:30.242Z [err] npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
2022-10-19T08:42:30.242Z [err] npm ERR!
2022-10-19T08:42:30.242Z [err]  gyp info spawn args   '-Dvisibility=default',
2022-10-19T08:42:30.242Z [err] npm ERR!
2022-10-19T08:42:30.243Z [err]  gyp info spawn args   '-Dnode_root_dir=/home/pi/.cache/node-gyp/18.11.0',
2022-10-19T08:42:30.243Z [err] npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
2022-10-19T08:42:30.243Z [err] npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/pi/.cache/node-gyp/18.11.0/<(target_arch)/node.lib',
2022-10-19T08:42:30.243Z [err] npm 
2022-10-19T08:42:30.243Z [err] ERR! gyp info spawn args   '-Dmodule_root_dir=/home/pi/.node-red/node_modules/@serialport/bindings',
2022-10-19T08:42:30.243Z [err] npm ERR!
2022-10-19T08:42:30.243Z [err]  gyp info spawn args   '-Dnode_engine=v8',
2022-10-19T08:42:30.243Z [err] npm ERR! gyp info spawn args   '--depth=.',
2022-10-19T08:42:30.243Z [err] npm
2022-10-19T08:42:30.243Z [err]  ERR! gyp info spawn args   '--no-parallel',
2022-10-19T08:42:30.243Z [err] npm ERR!
2022-10-19T08:42:30.243Z [err]  gyp info spawn args   '--generator-output',
2022-10-19T08:42:30.243Z [err] npm ERR! gyp info spawn args   'build',
2022-10-19T08:42:30.243Z [err] npm ERR! gyp info spawn args   '-Goutput_dir=.'
2022-10-19T08:42:30.243Z [err] npm 
2022-10-19T08:42:30.245Z [err] ERR! gyp info spawn args ]
2022-10-19T08:42:30.245Z [err] npm ERR!
2022-10-19T08:42:30.245Z [err]  gyp ERR! build error 
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack Error: not found: make
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17)
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21)
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33)
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! System Linux 5.15.0-52-generic
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2022-10-19T08:42:30.245Z [err] npm ERR! gyp ERR! cwd /home/pi/.node-red/node_modules/@serialport/bindings
2022-10-19T08:42:30.245Z [err] npm 
2022-10-19T08:42:30.246Z [err] ERR! gyp ERR! node -v v18.11.0
2022-10-19T08:42:30.246Z [err] npm ERR! gyp ERR! node-gyp -v v9.1.0
2022-10-19T08:42:30.246Z [err] npm ERR! gyp ERR! not ok
2022-10-19T08:42:30.253Z [err] 
2022-10-19T08:42:30.254Z [err] npm ERR! A complete log of this run can be found in:
2022-10-19T08:42:30.254Z [err] npm ERR!     /home/pi/.npm/_logs/2022-10-19T08_42_21_882Z-debug-0.log
2022-10-19T08:42:30.293Z rc=1
509 error code 1
510 error path /home/pi/.node-red/node_modules/@serialport/bindings
511 error command failed
512 error command sh -c -- prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
513 error prebuild-install warn install No prebuilt binaries found (target=18.11.0 runtime=node arch=x64 libc= platform=linux)
513 error gyp info it worked if it ends with ok
513 error gyp info using node-gyp@9.1.0
513 error gyp info using node@18.11.0 | linux | x64
513 error gyp info find Python using Python version 3.10.6 found at "/usr/bin/python3"
513 error gyp info spawn /usr/bin/python3
513 error gyp info spawn args [
513 error gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
513 error gyp info spawn args   'binding.gyp',
513 error gyp info spawn args   '-f',
513 error gyp info spawn args   'make',
513 error gyp info spawn args   '-I',
513 error gyp info spawn args   '/home/pi/.node-red/node_modules/@serialport/bindings/build/config.gypi',
513 error gyp info spawn args   '-I',
513 error gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
513 error gyp info spawn args   '-I',
513 error gyp info spawn args   '/home/pi/.cache/node-gyp/18.11.0/include/node/common.gypi',
513 error gyp info spawn args   '-Dlibrary=shared_library',
513 error gyp info spawn args   '-Dvisibility=default',
513 error gyp info spawn args   '-Dnode_root_dir=/home/pi/.cache/node-gyp/18.11.0',
513 error gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
513 error gyp info spawn args   '-Dnode_lib_file=/home/pi/.cache/node-gyp/18.11.0/<(target_arch)/node.lib',
513 error gyp info spawn args   '-Dmodule_root_dir=/home/pi/.node-red/node_modules/@serialport/bindings',
513 error gyp info spawn args   '-Dnode_engine=v8',
513 error gyp info spawn args   '--depth=.',
513 error gyp info spawn args   '--no-parallel',
513 error gyp info spawn args   '--generator-output',
513 error gyp info spawn args   'build',
513 error gyp info spawn args   '-Goutput_dir=.'
513 error gyp info spawn args ]
513 error gyp ERR! build error
513 error gyp ERR! stack Error: not found: make
513 error gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17)
513 error gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18
513 error gyp ERR! stack     at new Promise (<anonymous>)
513 error gyp ERR! stack     at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21)
513 error gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22
513 error gyp ERR! stack     at new Promise (<anonymous>)
513 error gyp ERR! stack     at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33)
513 error gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22
513 error gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
513 error gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
513 error gyp ERR! System Linux 5.15.0-52-generic
513 error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
513 error gyp ERR! cwd /home/pi/.node-red/node_modules/@serialport/bindings
513 error gyp ERR! node -v v18.11.0
513 error gyp ERR! node-gyp -v v9.1.0
513 error gyp ERR! not ok
514 verbose exit 1
515 timing npm Completed in 8364ms
516 verbose unfinished npm timer reify 1666168942286
517 verbose unfinished npm timer reify:build 1666168946882
518 verbose unfinished npm timer build 1666168946883
519 verbose unfinished npm timer build:deps 1666168946884
520 verbose unfinished npm timer build:run:install 1666168946909
521 verbose unfinished npm timer build:run:install:node_modules/@serialport/bindings 1666168946910
522 verbose code 1

do you know what´s the problem? missing packet?

Im gonna go with make was not found on your system

Try...
sudo apt install build-essential

then retry other NPM installs

1 Like

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