# Error during install Modbus Node in raspberry pi4

**URL:** <https://discourse.nodered.org/t/error-during-install-modbus-node-in-raspberry-pi4/29492>\
**Category:** General\
**Created:** [4 July 2020 10:17 UTC](https://discourse.nodered.org/t/error-during-install-modbus-node-in-raspberry-pi4/29492 "2020-07-04T10:17:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moabdelwahed](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Moabdelwahed](https://discourse.nodered.org/u/Moabdelwahed)\
**Post date:** [4 July 2020 10:17 UTC](https://discourse.nodered.org/t/error-during-install-modbus-node-in-raspberry-pi4/29492/1 "2020-07-04T10:17:29Z")

</div>

Hi every one

I start to learn Node-red from short time

I install it in my computer and install all nodes I need and everything is ok

but when I tried to use it with Raspberry pi4, I face issue in install node (node-red-contrib-modbus) for modbus communication.

Here is the full log.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(\*\* Start of log \*\*)-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2 Jul 20:36:11 - [info] Installing module: node-red-contrib-modbus, version: 5.1  
3.3  
2 Jul 20:36:48 - [warn] Installation of module node-red-contrib-modbus failed:  
2 Jul 20:36:48 - [warn] ------------------------------------------  
2 Jul 20:36:48 - [warn] prebuild-install WARN install No prebuilt binaries found  
(target=10.21.0 runtime=node arch=arm libc= platform=linux)  
make: \*\*\* No targets specified and no makefile found. Stop.  
gyp ERR! build error  
gyp ERR! stack Error: `make` failed with exit code: 2  
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node\_modules/npm/node\_  
modules/node-gyp/lib/build.js:194:23)  
gyp ERR! stack at ChildProcess.emit (events.js:198:13)  
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child\_proces  
s.js:248:12)  
gyp ERR! System Linux 4.19.118-v7l+  
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node\_modules/npm/node\_modules/n  
ode-gyp/bin/node-gyp.js" "rebuild"  
gyp ERR! cwd /home/pi/.node-red/node\_modules/@serialport/bindings  
gyp ERR! node -v v10.21.0  
gyp ERR! node-gyp -v v5.1.0  
gyp ERR! not ok  
make: \*\*\* No targets specified and no makefile found. Stop.  
gyp ERR! build error  
gyp ERR! stack Error: `make` failed with exit code: 2  
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node\_modules/npm/node_  
modules/node-gyp/lib/build.js:194:23)  
gyp ERR! stack at ChildProcess.emit (events.js:198:13)  
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child\_proces  
s.js:248:12)  
gyp ERR! System Linux 4.19.118-v7l+  
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node\_modules/npm/node\_modules/  
node-gyp/bin/node-gyp.js" "configure" "build"  
gyp ERR! cwd /home/pi/.node-red/node\_modules/fs-ext  
gyp ERR! node -v v10.21.0  
gyp ERR! node-gyp -v v5.1.0  
gyp ERR! not ok  
prebuild-install WARN install No prebuilt binaries found (target=10.21.0 runtime  
=node arch=arm libc= platform=linux)  
make: \*\*\* No targets specified and no makefile found. Stop.  
gyp ERR! build error  
gyp ERR! stack Error: `make` failed with exit code: 2  
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node\_modules/npm/node_  
modules/node-gyp/lib/build.js:194:23)  
gyp ERR! stack at ChildProcess.emit (events.js:198:13)  
gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_proces  
s.js:248:12)  
gyp ERR! System Linux 4.19.118-v7l+  
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node\_modules/npm/node\_modules/n  
ode-gyp/bin/node-gyp.js" "rebuild"  
gyp ERR! cwd /home/pi/.node-red/node\_modules/modbus-serial/node\_modules/@serialp  
ort/bindings  
gyp ERR! node -v v10.21.0  
gyp ERR! node-gyp -v v5.1.0  
gyp ERR! not ok  
npm WARN node-red-contrib-ui-led@0.3.1 requires a peer of node-red-dashboard@2.1  
4.x but none is installed. You must install peer dependencies yourself.  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @serialport/bindings@9.0.0 (node  
\_modules/@serialport/bindings):  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @serialport/bindings@9.0.0 insta  
ll: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-ext@0.5.0 (node\_modules/fs-ex  
t):  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-ext@0.5.0 install: `node-gyp configure build`  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1  
npm ERR! code ELIFECYCLE  
npm ERR! errno 1  
npm ERR! @serialport/bindings@8.0.8 install: `prebuild-install --tag-prefix @ser ialport/bindings@ || node-gyp rebuild`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the @serialport/bindings@8.0.8 install script.  
npm ERR! This is probably not a problem with npm. There is likely additional log  
ging output above.  
npm ERR! A complete log of this run can be found in:  
npm ERR! /home/pi/.npm/\_logs/2020-07-02T19\_36\_48\_162Z-debug.log  
2 Jul 20:36:48 - [warn] ------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(\*\* End of log \*\*)------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I also upgrade the full OS using (sudo apt full-upgrade)  
Also ued this commad ( sudo apt-get install build-essential)

If any one face problem like this or any one can help me, I will be so grateful.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 July 2020 12:28 UTC](https://discourse.nodered.org/t/error-during-install-modbus-node-in-raspberry-pi4/29492/2 "2020-07-04T12:28:29Z")

</div>

I don't know what might cause this, but since no-one else has replied so far then possibly I can get things moving.  
Firstly to get your system up to date you have run `sudo apt update` before `sudo apt full-upgrade` so try that first. Then in a terminal go to your .node-red folder and run  
`npm install node-red-contrib-modbus`  
if that still fails then how did you install node-red? The recommended way is using the script from [https://nodered.org/docs/getting-started/raspberrypi](https://nodered.org/docs/getting-started/raspberrypi)

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [4 July 2020 20:20 UTC](https://discourse.nodered.org/t/error-during-install-modbus-node-in-raspberry-pi4/29492/3 "2020-07-04T20:20:33Z")

</div>

As the error seems to be related to `serialport`, maybe something on this thread will help resolve the issue: [Why can't the serial palette be installed](https://discourse.nodered.org/t/why-cant-the-serial-palette-be-installed/28521)?

---

<div class="post-metadata">

**Author:** ![Moabdelwahed](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Moabdelwahed](https://discourse.nodered.org/u/Moabdelwahed)\
**Post date:** [5 July 2020 06:31 UTC](https://discourse.nodered.org/t/error-during-install-modbus-node-in-raspberry-pi4/29492/4 "2020-07-05T06:31:19Z")

</div>

Thank you guys for your reply  
First I upgraded the operating system and there were no any errors, but when I upgrade node red it gave me a lot of errors then i tried to install modbus node again but it didn't work

But your comment give me good idea to remove full node red and install it from beginning

(as I didn't install it first time at raspberry pi, but it installed with operation system)

So after remove full node-red and Node.js and install them from scratch and I tried again to install modbus node it finally work.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 July 2020 06:42 UTC](https://discourse.nodered.org/t/error-during-install-modbus-node-in-raspberry-pi4/29492/5 "2020-07-19T06:42:20Z")

</div>

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