# Error while installing node-red-contrib-modbus

**URL:** https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660
**Category:** General
**Created:** [29 September 2021 08:45 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660 "2021-09-29T08:45:20Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![KevJ](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@KevJ](https://discourse.nodered.org/u/KevJ)
#### Post date: [29 September 2021 08:45 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/1 "2021-09-29T08:45:20Z")

</div>

Hi, it´s my first post here. I got the Node-RED version: v10.15.3 and the Node.js version: v0.20l.7. I tried to install the node-red-contrib-modbus node, but i got a bunch of erorrs after starting the installation in node-red. Can someone help me, what this error means?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9e7205142f939bd0e831ee698c619d3769d6fa9b.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/b/fb7d238ceeb9019f455e810244203b5c1224ae83.png)

---

<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: [29 September 2021 10:53 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/2 "2021-09-29T10:53:46Z")

</div>

Please copy/paste the log here, not screenshot. That is virtually illegible on my system. When pasting use the `</>` button at the top of the forum entry window.

You haven't got node-red version 10.15.3, that may be the nodejs version. However 0.201.7 is also not the node-red version so please clarify that.

---

<div class="post-metadata">

### Author: ![KevJ](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@KevJ](https://discourse.nodered.org/u/KevJ)
#### Post date: [29 September 2021 11:16 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/3 "2021-09-29T11:16:56Z")

</div>

Oh yeah sorry for that. I mixed the Versions up, so The Node-Red Version is: v0.20.7 and the Node.js version is: v10.15.3. And here again my error messages:

```auto
2021-09-29T08:37:55.447Z Install : node-red-contrib-modbus 5.14.1

2021-09-29T08:37:55.455Z npm.cmd install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-modbus@5.14.1
2021-09-29T08:37:58.803Z [err] npm
2021-09-29T08:37:58.803Z [err] WARN registry Unexpected warning for https://wain05400.apa.gad.schneider-electric.com:4878/: Miscellaneous Warning UNABLE_TO_VERIFY_LEAF_SIGNATURE: request to https://wain05400.apa.gad.schneider-electric.com:4878/node-red-contrib-modbus failed, reason: unable to verify the first certificate
2021-09-29T08:37:58.803Z [err] npm
2021-09-29T08:37:58.803Z [err] WARN registry Using stale package data from https://wain05400.apa.gad.schneider-electric.com:4878/ due to a request error during revalidation.
2021-09-29T08:38:11.431Z [out] 
2021-09-29T08:38:11.431Z [out] > @serialport/bindings@9.2.4 install C:\Users\labor\.node-red\node_modules\@serialport\bindings
2021-09-29T08:38:11.431Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2021-09-29T08:38:11.431Z [out] 
2021-09-29T08:38:34.133Z [err] prebuild-install
2021-09-29T08:38:34.133Z [err] WARN install connect ECONNREFUSED 140.82.121.4:443
2021-09-29T08:38:34.150Z [out] 
2021-09-29T08:38:34.150Z [out] C:\Users\labor\.node-red\node_modules\@serialport\bindings>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 
2021-09-29T08:38:34.150Z [out] else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 
2021-09-29T08:38:34.517Z [err] gyp
2021-09-29T08:38:34.517Z [err] ERR! 
2021-09-29T08:38:34.517Z [err] configure error 
2021-09-29T08:38:34.517Z [err] gyp
2021-09-29T08:38:34.518Z [err] ERR! stack
2021-09-29T08:38:34.518Z [err] Error: Command failed: C:\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
2021-09-29T08:38:34.518Z [err] gyp
2021-09-29T08:38:34.518Z [err] ERR! stack
2021-09-29T08:38:34.518Z [err] File "<string>", line 1
2021-09-29T08:38:34.518Z [err] gyp ERR!
2021-09-29T08:38:34.518Z [err] stack import sys; print "%s.%s.%s" % sys.version_info[:3];
2021-09-29T08:38:34.518Z [err] gyp
2021-09-29T08:38:34.518Z [err] ERR! stack
2021-09-29T08:38:34.518Z [err] ^
2021-09-29T08:38:34.518Z [err] gyp ERR! 
2021-09-29T08:38:34.518Z [err] stack SyntaxError: invalid syntax
2021-09-29T08:38:34.518Z [err] gyp
2021-09-29T08:38:34.518Z [err] ERR! stack
2021-09-29T08:38:34.518Z [err]  
2021-09-29T08:38:34.518Z [err] gyp ERR!
2021-09-29T08:38:34.518Z [err] stack at ChildProcess.exithandler (child_process.js:294:12)
2021-09-29T08:38:34.518Z [err] gyp ERR!
2021-09-29T08:38:34.518Z [err] stack at ChildProcess.emit (events.js:189:13)
2021-09-29T08:38:34.518Z [err] gyp
2021-09-29T08:38:34.518Z [err] ERR! stack
2021-09-29T08:38:34.518Z [err] at maybeClose (internal/child_process.js:970:16)
2021-09-29T08:38:34.518Z [err] gyp ERR! 
2021-09-29T08:38:34.518Z [err] stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
2021-09-29T08:38:34.518Z [err] gyp
2021-09-29T08:38:34.518Z [err] ERR! System Windows_NT 10.0.19042
2021-09-29T08:38:34.518Z [err] gyp 
2021-09-29T08:38:34.518Z [err] ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
2021-09-29T08:38:34.518Z [err] gyp
2021-09-29T08:38:34.518Z [err] ERR! cwd
2021-09-29T08:38:34.518Z [err] C:\Users\labor\.node-red\node_modules\@serialport\bindings
2021-09-29T08:38:34.518Z [err] gyp 
2021-09-29T08:38:34.518Z [err] ERR! node -v v10.15.3
2021-09-29T08:38:34.518Z [err] gyp ERR! node-gyp -v
2021-09-29T08:38:34.518Z [err] v3.8.0
2021-09-29T08:38:34.518Z [err] gyp
2021-09-29T08:38:34.518Z [err] ERR! not ok
2021-09-29T08:38:34.518Z [err]  
2021-09-29T08:38:35.058Z [err] npm
2021-09-29T08:38:35.059Z [err] ERR! code ELIFECYCLE
2021-09-29T08:38:35.059Z [err] npm
2021-09-29T08:38:35.059Z [err] ERR! errno 1
2021-09-29T08:38:35.060Z [err] npm ERR! @serialport/bindings@9.2.4 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`
2021-09-29T08:38:35.060Z [err] npm ERR!
2021-09-29T08:38:35.060Z [err] Exit status 1
2021-09-29T08:38:35.060Z [err] npm 
2021-09-29T08:38:35.060Z [err] ERR! 
2021-09-29T08:38:35.060Z [err] npm 
2021-09-29T08:38:35.060Z [err] ERR! Failed at the @serialport/bindings@9.2.4 install script.
2021-09-29T08:38:35.060Z [err] npm 
2021-09-29T08:38:35.060Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-09-29T08:38:35.084Z [err] 
2021-09-29T08:38:35.084Z [err] npm ERR! A complete log of this run can be found in:
2021-09-29T08:38:35.084Z [err] npm ERR! C:\Users\labor\AppData\Roaming\npm-cache\_logs\2021-09-29T08_38_35_065Z-debug.log
2021-09-29T08:38:35.103Z 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: [29 September 2021 11:31 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/4 "2021-09-29T11:31:37Z")

</div>

> [@KevJ](#):
>
> `Unexpected warning for https://wain05400.apa.gad.schneider-electric.com:4878/: `

I have no idea why it is trying to fetch data from there. That domain name does not even exist. Have you got that setup as an npm repository?

---

<div class="post-metadata">

### Author: ![KevJ](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@KevJ](https://discourse.nodered.org/u/KevJ)
#### Post date: [29 September 2021 11:50 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/5 "2021-09-29T11:50:20Z")

</div>

Yes it is a repository of my company.

---

<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: [29 September 2021 12:47 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/6 "2021-09-29T12:47:56Z")

</div>

So you need to fix that first. npm can't access it. Neither can I (but perhaps it is not public).

---

<div class="post-metadata">

### Author: ![KevJ](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@KevJ](https://discourse.nodered.org/u/KevJ)
#### Post date: [29 September 2021 13:04 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/7 "2021-09-29T13:04:11Z")

</div>

Well...okay thanks anyway for the quick answers

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [29 September 2021 13:07 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/8 "2021-09-29T13:07:23Z")

</div>

> [@KevJ](#):
>
> ```auto
> 2021-09-29T08:38:34.518Z [err] ERR! stack
> 2021-09-29T08:38:34.518Z [err] Error: Command failed: C:\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
> 2021-09-29T08:38:34.518Z [err] gyp
> 2021-09-29T08:38:34.518Z [err] ERR! stack
> 2021-09-29T08:38:34.518Z [err] File "<string>", line 1
> 2021-09-29T08:38:34.518Z [err] gyp ERR!
> 2021-09-29T08:38:34.518Z [err] stack import sys; print "%s.%s.%s" % sys.version_info[:3];
> 2021-09-29T08:38:34.518Z [err] gyp
> 2021-09-29T08:38:34.518Z [err] ERR! stack
> 2021-09-29T08:38:34.518Z [err] ^
> 2021-09-29T08:38:34.518Z [err] gyp ERR! 
> 2021-09-29T08:38:34.518Z [err] stack SyntaxError: invalid syntax
> 
> ```

This error is because you are using python3 but it looks like the serial module requires python2.

---

<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: [28 November 2021 13:08 UTC](https://discourse.nodered.org/t/error-while-installing-node-red-contrib-modbus/51660/9 "2021-11-28T13:08:25Z")

</div>

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