# Failed to install: node-red-contrib-modbus

**URL:** https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052
**Category:** General
**Created:** [21 May 2021 18:52 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052 "2021-05-21T18:52:00Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [21 May 2021 18:52 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/1 "2021-05-21T18:52:00Z")

</div>

Dear colleagues. I am starting node-red with ubuntu and I have the following problem. I have installed it on ubuntu, and it runs on localhost: 1880. It runs directly when Linux starts. The problem I have had when trying to load node-red-contrib-modbus. It gives me the following error

Failed to install: node-red-contrib-modbus

Install failed Check the log for more information

Later I have installed it with npm from the ubuntu terminal. I think I have done it in the correct directory, (node\_modules), but it still does not appear on the palette. If it seems that it is loaded as we see in the screenshot.

![Captura de pantalla de 2021-05-21 20-26-01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/f/5fbd66c9d2b19030d8db7df1f3fa849cd7ff2248.png)  
021-05-21T18:15:59.517Z Install : node-red-contrib-modbus 5.14.0

2021-05-21T18:15:59.520Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-modbus@5.14.0  
2021-05-21T18:16:13.060Z [out]  
2021-05-21T18:16:13.060Z [out] \> @serialport/bindings@9.0.7 install /root/snap/node-red/675/node\_modules/@serialport/bindings  
2021-05-21T18:16:13.060Z [out] \> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild  
2021-05-21T18:16:13.060Z [out]  
2021-05-21T18:16:13.295Z [err] prebuild-install  
2021-05-21T18:16:13.295Z [err]  
2021-05-21T18:16:13.295Z [err] WARN  
2021-05-21T18:16:13.295Z [err] install  
2021-05-21T18:16:13.295Z [err] EPERM: operation not permitted, lchown '/root/snap/node-red/675/node\_modules/@serialport/bindings/build/Release'  
2021-05-21T18:16:14.192Z [err] gyp  
2021-05-21T18:16:14.192Z [err]  
2021-05-21T18:16:14.192Z [err] ERR! build error  
2021-05-21T18:16:14.193Z [err] gyp ERR! stack Error: not found: make  
2021-05-21T18:16:14.193Z [err] gyp ERR! stack  
2021-05-21T18:16:14.193Z [err] at getNotFoundError (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:13:12)  
2021-05-21T18:16:14.193Z [err] gyp  
2021-05-21T18:16:14.193Z [err] ERR! stack  
2021-05-21T18:16:14.193Z [err] at F (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:68:19)  
2021-05-21T18:16:14.193Z [err] gyp  
2021-05-21T18:16:14.193Z [err] ERR!  
2021-05-21T18:16:14.193Z [err] stack at E (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:80:29)  
2021-05-21T18:16:14.193Z [err] gyp ERR!  
2021-05-21T18:16:14.193Z [err] stack  
2021-05-21T18:16:14.193Z [err] at /snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:89:16  
2021-05-21T18:16:14.193Z [err] gyp  
2021-05-21T18:16:14.193Z [err] ERR!  
2021-05-21T18:16:14.193Z [err] stack at /snap/node-red/675/lib/node\_modules/npm/node\_modules/isexe/index.js:42:5  
2021-05-21T18:16:14.193Z [err] gyp  
2021-05-21T18:16:14.193Z [err] ERR!  
2021-05-21T18:16:14.193Z [err] stack at /snap/node-red/675/lib/node\_modules/npm/node\_modules/isexe/mode.js:8:5  
2021-05-21T18:16:14.193Z [err] gyp  
2021-05-21T18:16:14.193Z [err] ERR!  
2021-05-21T18:16:14.193Z [err] stack at FSReqWrap.oncomplete (fs.js:153:21)  
2021-05-21T18:16:14.194Z [err] gyp  
2021-05-21T18:16:14.194Z [err] ERR!  
2021-05-21T18:16:14.194Z [err] System Linux 5.8.0-53-generic  
2021-05-21T18:16:14.194Z [err] gyp  
2021-05-21T18:16:14.194Z [err] ERR!  
2021-05-21T18:16:14.194Z [err] command  
2021-05-21T18:16:14.194Z [err] "/snap/node-red/675/bin/node" "/snap/node-red/675/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js" "rebuild"  
2021-05-21T18:16:14.194Z [err] gyp  
2021-05-21T18:16:14.194Z [err] ERR!  
2021-05-21T18:16:14.194Z [err] cwd /root/snap/node-red/675/node\_modules/@serialport/bindings  
2021-05-21T18:16:14.194Z [err] gyp  
2021-05-21T18:16:14.194Z [err] ERR!  
2021-05-21T18:16:14.194Z [err] node -v v10.23.3  
2021-05-21T18:16:14.194Z [err] gyp  
2021-05-21T18:16:14.194Z [err] ERR! node-gyp -v v5.1.0  
2021-05-21T18:16:14.194Z [err] gyp  
2021-05-21T18:16:14.194Z [err] ERR!  
2021-05-21T18:16:14.194Z [err] not ok  
2021-05-21T18:16:14.551Z [err] npm  
2021-05-21T18:16:14.551Z [err] ERR! code ELIFECYCLE  
2021-05-21T18:16:14.551Z [err] npm  
2021-05-21T18:16:14.552Z [err] ERR! errno 1  
2021-05-21T18:16:14.559Z [err] npm  
2021-05-21T18:16:14.560Z [err] ERR! @serialport/bindings@9.0.7 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`  
2021-05-21T18:16:14.560Z [err] npm ERR!  
2021-05-21T18:16:14.560Z [err] Exit status 1  
2021-05-21T18:16:14.560Z [err] npm  
2021-05-21T18:16:14.560Z [err] ERR!  
2021-05-21T18:16:14.560Z [err]  
2021-05-21T18:16:14.560Z [err] npm  
2021-05-21T18:16:14.560Z [err] ERR!  
2021-05-21T18:16:14.560Z [err] Failed at the @serialport/bindings@9.0.7 install script.  
2021-05-21T18:16:14.560Z [err] npm  
2021-05-21T18:16:14.561Z [err] ERR!  
2021-05-21T18:16:14.561Z [err] This is probably not a problem with npm. There is likely additional logging output above.  
2021-05-21T18:16:14.624Z [err]  
2021-05-21T18:16:14.624Z [err] npm ERR! A complete log of this run can be found in:  
2021-05-21T18:16:14.624Z [err] npm ERR!  
2021-05-21T18:16:14.624Z [err] /root/snap/node-red/675/.npm/\_logs/2021-05-21T18\_16\_14\_580Z-debug.log  
2021-05-21T18:16:14.655Z rc=1

Someone has a solution

---

<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: [21 May 2021 20:25 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/2 "2021-05-21T20:25:48Z")

</div>

Are you using a snap install of node-red? If so is there a reason for using that rather than the [recommended method](https://nodered.org/docs/getting-started/raspberrypi) for Ubuntu, Raspbian and other Debian derivatives?

> [@santos](#):
>
> I think I have done it in the correct directory, (node\_modules)

That is not the correct folder, though I can't say which is the correct folder other than it should be the one where you flows and settings files are. If you start node-red in a terminal the startup log will tell you where that is. If you have used the recommended install method it will be `~/.node-red`

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [21 May 2021 20:31 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/3 "2021-05-21T20:31:15Z")

</div>

Thanks for your reply. I used npm as described in the link.

[https://nodered.org/docs/getting-started/local](https://nodered.org/docs/getting-started/local)

---

<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: [21 May 2021 20:42 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/4 "2021-05-21T20:42:25Z")

</div>

OK, you can install it yourself if you want (note that at the top of that page is the link to the Ubuntu install).  
Stop node-red and start it again in a terminal please and post the log here. When pasting it in use the `</>` button at the top of the forum entry window.

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [21 May 2021 20:56 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/5 "2021-05-21T20:56:19Z")

</div>

This is what comes out when starting node-red from the terminal. It stays activated even if I close the terminal.

santos@tecnoce:~$ node-red  
21 May 22:49:52 - [info]

# Welcome to Node-RED

21 May 22:49:52 - [info] Node-RED version: v1.3.5  
21 May 22:49:52 - [info] Node.js version: v10.19.0  
21 May 22:49:52 - [info] Linux 5.8.0-53-generic x64 LE  
21 May 22:49:53 - [info] Loading palette nodes  
21 May 22:49:53 - [info] Settings file : /home/santos/.node-red/settings.js  
21 May 22:49:53 - [info] Context store : 'default' [module=memory]  
21 May 22:49:53 - [info] User directory : /home/santos/.node-red  
21 May 22:49:53 - [warn] Projects disabled : editorTheme.projects.enabled=false  
21 May 22:49:53 - [info] Flows file : /home/santos/.node-red/flows\_tecnoce.json  
21 May 22:49:53 - [info] Creating new flow file  
21 May 22:49:53 - [warn]

* * *

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

21 May 22:49:53 - [error] Unable to listen on [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
21 May 22:49:53 - [error] Error: port in use

---

<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: [21 May 2021 20:59 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/6 "2021-05-21T20:59:34Z")

</div>

> [@santos](#):
>
> 21 May 22:49:53 - [error] Unable to listen on [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
> 21 May 22:49:53 - [error] Error: port in use

That is probably because you already have node-red running.

> [@santos](#):
>
> [info] Flows file : /home/santos/.node-red/flows\_tecnoce.json

That tells us you need to be in that folder if you want to install a node using npm from the command line.

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [21 May 2021 21:06 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/7 "2021-05-21T21:06:29Z")

</div>

Yes, node-red is always running, even if I close the terminal. Before, I worked with windows and that didn't happen, I had to run node-red every time I started the computer.

---

<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: [21 May 2021 21:08 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/8 "2021-05-21T21:08:13Z")

</div>

If you installed the usual scripts then you can stop and start using  
`node-red-stop`  
`node-red-start`

If you do install a node from the command line you need to restart node-red before it will see the new nodes.

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [21 May 2021 21:16 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/9 "2021-05-21T21:16:25Z")

</div>

> [@Colin](#):
>
> node-red-stop

When I type node-red-stop it tells me that it cannot find the command.

---

<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: [21 May 2021 21:20 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/10 "2021-05-21T21:20:52Z")

</div>

That is because you did not use the recommended script, which would install the commands for you. You can still run that script now if you want, it should add the stuff you have not installed yourself.

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [21 May 2021 21:57 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/11 "2021-05-21T21:57:46Z")

</div>

Thanks, I hadn't installed the scripts. I am doing it minus this command which does not work.

I am literally typing it in the console, but I don't know if anything else is necessary.

```auto
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

```

---

<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: [22 May 2021 06:04 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/12 "2021-05-22T06:04:31Z")

</div>

What happens when you run it? Have you installed curl?  
Also see the prerequisites section on the page.

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [22 May 2021 09:49 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/13 "2021-05-22T09:49:10Z")

</div>

Good Morning. Thanks for your interest. I think I know where the problems are. I uninstalled node-red. But then I have realized that ubuntu has it integrated. With node-red uninstalled it works the same on localhost  
[http://localhost:1880/#flow/41328911.f504f8](http://localhost:1880/#flow/41328911.f504f8)

That is why it gave me the error of the port has occupied. Nodes can be installed here but it does not allow modbus nodes, which is where I detected the problem initially.

I paste the error log again when trying to install node-red-contribution-modbus

36:59.728Z Install : node-red-contrib-modbus 5.14.0

2021-05-22T09:36:59.799Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-modbus@5.14.0  
2021-05-22T09:37:11.636Z [out]  
2021-05-22T09:37:11.636Z [out] \> @serialport/bindings@9.0.7 install /root/snap/node-red/675/node\_modules/@serialport/bindings  
2021-05-22T09:37:11.636Z [out] \> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild  
2021-05-22T09:37:11.636Z [out]  
2021-05-22T09:37:11.929Z [err] prebuild-install  
2021-05-22T09:37:11.929Z [err] WARN install EPERM: operation not permitted, lchown '/root/snap/node-red/675/node\_modules/@serialport/bindings/build/Release'  
2021-05-22T09:37:13.373Z [err] gyp  
2021-05-22T09:37:13.373Z [err]  
2021-05-22T09:37:13.373Z [err] ERR!  
2021-05-22T09:37:13.373Z [err] build error  
2021-05-22T09:37:13.373Z [err] gyp ERR!  
2021-05-22T09:37:13.373Z [err] stack Error: not found: make  
2021-05-22T09:37:13.373Z [err] gyp  
2021-05-22T09:37:13.373Z [err] ERR! stack  
2021-05-22T09:37:13.373Z [err] at getNotFoundError (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:13:12)  
2021-05-22T09:37:13.373Z [err] gyp  
2021-05-22T09:37:13.373Z [err] ERR! stack at F (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:68:19)  
2021-05-22T09:37:13.373Z [err] gyp ERR! stack  
2021-05-22T09:37:13.373Z [err] at E (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:80:29)  
2021-05-22T09:37:13.373Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR! stack  
2021-05-22T09:37:13.374Z [err] at /snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:89:16  
2021-05-22T09:37:13.374Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR! stack  
2021-05-22T09:37:13.374Z [err] at /snap/node-red/675/lib/node\_modules/npm/node\_modules/isexe/index.js:42:5  
2021-05-22T09:37:13.374Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR!  
2021-05-22T09:37:13.374Z [err] stack at /snap/node-red/675/lib/node\_modules/npm/node\_modules/isexe/mode.js:8:5  
2021-05-22T09:37:13.374Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR! stack  
2021-05-22T09:37:13.374Z [err] at FSReqWrap.oncomplete (fs.js:153:21)  
2021-05-22T09:37:13.374Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR! System Linux 5.8.0-53-generic  
2021-05-22T09:37:13.374Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR! command  
2021-05-22T09:37:13.374Z [err] "/snap/node-red/675/bin/node" "/snap/node-red/675/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js" "rebuild"  
2021-05-22T09:37:13.374Z [err] gyp ERR!  
2021-05-22T09:37:13.374Z [err] cwd /root/snap/node-red/675/node\_modules/@serialport/bindings  
2021-05-22T09:37:13.374Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR! node -v  
2021-05-22T09:37:13.374Z [err] v10.23.3  
2021-05-22T09:37:13.374Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR! node-gyp -v  
2021-05-22T09:37:13.374Z [err] v5.1.0  
2021-05-22T09:37:13.374Z [err] gyp  
2021-05-22T09:37:13.374Z [err] ERR!  
2021-05-22T09:37:13.375Z [err] not ok  
2021-05-22T09:37:13.701Z [err] npm  
2021-05-22T09:37:13.701Z [err] ERR! code ELIFECYCLE  
2021-05-22T09:37:13.703Z [err] npm  
2021-05-22T09:37:13.703Z [err] ERR!  
2021-05-22T09:37:13.703Z [err] errno 1  
2021-05-22T09:37:13.712Z [err] npm ERR!  
2021-05-22T09:37:13.712Z [err] @serialport/bindings@9.0.7 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`  
2021-05-22T09:37:13.712Z [err] npm ERR! Exit status 1  
2021-05-22T09:37:13.712Z [err] npm ERR!  
2021-05-22T09:37:13.712Z [err]  
2021-05-22T09:37:13.712Z [err] npm ERR!  
2021-05-22T09:37:13.712Z [err] Failed at the @serialport/bindings@9.0.7 install script.  
2021-05-22T09:37:13.712Z [err] npm ERR!  
2021-05-22T09:37:13.712Z [err] This is probably not a problem with npm. There is likely additional logging output above.  
2021-05-22T09:37:13.782Z [err]  
2021-05-22T09:37:13.783Z [err] npm ERR! A complete log of this run can be found in:  
2021-05-22T09:37:13.783Z [err] npm ERR!  
2021-05-22T09:37:13.783Z [err] /root/snap/node-red/675/.npm/\_logs/2021-05-22T09\_37\_13\_723Z-debug.log  
2021-05-22T09:37:13.797Z rc=1

* * *

2021-05-22T09:52:14.345Z Install : node-red-contrib-modbus 5.14.0

2021-05-22T09:52:14.361Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-modbus@5.14.0  
2021-05-22T09:52:18.644Z [out]  
2021-05-22T09:52:18.644Z [out] \> @serialport/bindings@9.0.7 install /root/snap/node-red/675/node\_modules/@serialport/bindings  
2021-05-22T09:52:18.644Z [out] \> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild  
2021-05-22T09:52:18.644Z [out]  
2021-05-22T09:52:18.867Z [err] prebuild-install  
2021-05-22T09:52:18.867Z [err] WARN  
2021-05-22T09:52:18.867Z [err] install EPERM: operation not permitted, lchown '/root/snap/node-red/675/node\_modules/@serialport/bindings/build/Release'  
2021-05-22T09:52:19.688Z [err] gyp  
2021-05-22T09:52:19.688Z [err]  
2021-05-22T09:52:19.688Z [err] ERR! build error  
2021-05-22T09:52:19.689Z [err] gyp  
2021-05-22T09:52:19.689Z [err] ERR! stack Error: not found: make  
2021-05-22T09:52:19.689Z [err] gyp ERR!  
2021-05-22T09:52:19.689Z [err] stack at getNotFoundError (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:13:12)  
2021-05-22T09:52:19.689Z [err] gyp ERR!  
2021-05-22T09:52:19.689Z [err] stack at F (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:68:19)  
2021-05-22T09:52:19.689Z [err] gyp  
2021-05-22T09:52:19.689Z [err] ERR! stack  
2021-05-22T09:52:19.689Z [err] at E (/snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:80:29)  
2021-05-22T09:52:19.689Z [err] gyp  
2021-05-22T09:52:19.689Z [err] ERR! stack  
2021-05-22T09:52:19.689Z [err] at /snap/node-red/675/lib/node\_modules/npm/node\_modules/which/which.js:89:16  
2021-05-22T09:52:19.689Z [err] gyp  
2021-05-22T09:52:19.690Z [err] ERR! stack  
2021-05-22T09:52:19.690Z [err] at /snap/node-red/675/lib/node\_modules/npm/node\_modules/isexe/index.js:42:5  
2021-05-22T09:52:19.690Z [err] gyp  
2021-05-22T09:52:19.690Z [err] ERR! stack  
2021-05-22T09:52:19.690Z [err] at /snap/node-red/675/lib/node\_modules/npm/node\_modules/isexe/mode.js:8:5  
2021-05-22T09:52:19.690Z [err] gyp  
2021-05-22T09:52:19.690Z [err] ERR! stack  
2021-05-22T09:52:19.690Z [err] at FSReqWrap.oncomplete (fs.js:153:21)  
2021-05-22T09:52:19.690Z [err] gyp  
2021-05-22T09:52:19.690Z [err] ERR! System  
2021-05-22T09:52:19.690Z [err] Linux 5.8.0-53-generic  
2021-05-22T09:52:19.690Z [err] gyp  
2021-05-22T09:52:19.690Z [err] ERR!  
2021-05-22T09:52:19.690Z [err] command  
2021-05-22T09:52:19.690Z [err] "/snap/node-red/675/bin/node" "/snap/node-red/675/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js" "rebuild"  
2021-05-22T09:52:19.690Z [err] gyp  
2021-05-22T09:52:19.690Z [err] ERR!  
2021-05-22T09:52:19.690Z [err] cwd  
2021-05-22T09:52:19.691Z [err] /root/snap/node-red/675/node\_modules/@serialport/bindings  
2021-05-22T09:52:19.691Z [err] gyp  
2021-05-22T09:52:19.691Z [err] ERR!  
2021-05-22T09:52:19.691Z [err] node -v  
2021-05-22T09:52:19.691Z [err] v10.23.3  
2021-05-22T09:52:19.691Z [err] gyp  
2021-05-22T09:52:19.691Z [err] ERR!  
2021-05-22T09:52:19.691Z [err] node-gyp -v v5.1.0  
2021-05-22T09:52:19.691Z [err] gyp  
2021-05-22T09:52:19.691Z [err] ERR!  
2021-05-22T09:52:19.691Z [err] not ok  
2021-05-22T09:52:19.691Z [err]  
2021-05-22T09:52:19.947Z [err] npm  
2021-05-22T09:52:19.947Z [err] ERR! code ELIFECYCLE  
2021-05-22T09:52:19.947Z [err] npm ERR!  
2021-05-22T09:52:19.947Z [err] errno 1  
2021-05-22T09:52:19.949Z [err] npm  
2021-05-22T09:52:19.949Z [err] ERR! @serialport/bindings@9.0.7 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`  
2021-05-22T09:52:19.949Z [err] npm  
2021-05-22T09:52:19.950Z [err] ERR! Exit status 1  
2021-05-22T09:52:19.950Z [err] npm ERR!  
2021-05-22T09:52:19.950Z [err]  
2021-05-22T09:52:19.950Z [err] npm ERR!  
2021-05-22T09:52:19.950Z [err] Failed at the @serialport/bindings@9.0.7 install script.  
2021-05-22T09:52:19.950Z [err] npm  
2021-05-22T09:52:19.950Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.  
2021-05-22T09:52:19.999Z [err]  
2021-05-22T09:52:19.999Z [err] npm ERR! A complete log of this run can be found in:  
2021-05-22T09:52:19.999Z [err] npm ERR!  
2021-05-22T09:52:19.999Z [err] /root/snap/node-red/675/.npm/\_logs/2021-05-22T09\_52\_19\_957Z-debug.log  
2021-05-22T09:52:20.010Z rc=1

---

<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: [22 May 2021 09:54 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/14 "2021-05-22T09:54:11Z")

</div>

Running the script would have uninstalled the original node-red. Have you managed to run it yet? If not then do these commands work?  
`ping raw.githubusercontent.com`  
`curl https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered`  
The latter should download and show the script contents.

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [22 May 2021 09:58 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/15 "2021-05-22T09:58:12Z")

</div>

Running ping gives the following

@tecnoce:~/node\_modules$ ping [raw.githubusercontent.com](http://raw.githubusercontent.com)  
PING [raw.githubusercontent.com](http://raw.githubusercontent.com) (185.199.111.133) 56(84) bytes of data.  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=1 ttl=57 time=15.8 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=2 ttl=57 time=17.2 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=3 ttl=57 time=38.6 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=4 ttl=57 time=17.8 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=5 ttl=57 time=16.6 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=6 ttl=57 time=17.6 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=7 ttl=57 time=30.7 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=8 ttl=57 time=38.2 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=9 ttl=57 time=16.7 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=10 ttl=57 time=16.5 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=11 ttl=57 time=16.3 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=12 ttl=57 time=16.9 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=13 ttl=57 time=47.6 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=14 ttl=57 time=16.7 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=15 ttl=57 time=18.0 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=16 ttl=57 time=83.6 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=17 ttl=57 time=25.3 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (185.199.111.133): icmp\_seq=18 ttl=57 time=44.8 ms  
64 bytes from [cdn-185-199-111-133.github.com](http://cdn-185-199-111-133.github.com) (

---

<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: [22 May 2021 10:27 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/16 "2021-05-22T10:27:41Z")

</div>

OK, that shows you can access the server. Does the curl command work?

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [22 May 2021 10:36 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/17 "2021-05-22T10:36:48Z")

</div>

I've used the curl command like this but it doesn't work.

bash \<(curl -sl://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [22 May 2021 10:42 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/18 "2021-05-22T10:42:26Z")

</div>

When you uninstalled. You did uninstall the snap version didn’t you ? From the log above it looks like it’s still the running one

---

<div class="post-metadata">

### Author: ![santos](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@santos](https://discourse.nodered.org/u/santos)
#### Post date: [22 May 2021 10:52 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/19 "2021-05-22T10:52:22Z")

</div>

> [@dceejay](#):
>
> snap

I'm checking. I uninstalled sap and have also uninstalled nodejs. However node-red still works on localhost. I get the impression that it is another version built into the ubuntu system.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [22 May 2021 11:18 UTC](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052/20 "2021-05-22T11:18:04Z")

</div>

So you did

```
sudo snap remove node-red
```

[Next page](https://discourse.nodered.org/t/failed-to-install-node-red-contrib-modbus/46052.md?page=2)
