# Unable to install nodes of Modbus and RS485

**URL:** <https://discourse.nodered.org/t/unable-to-install-nodes-of-modbus-and-rs485/61386>\
**Category:** General\
**Created:** [17 April 2022 07:16 UTC](https://discourse.nodered.org/t/unable-to-install-nodes-of-modbus-and-rs485/61386 "2022-04-17T07:16:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinx](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jinx](https://discourse.nodered.org/u/jinx)\
**Post date:** [17 April 2022 07:16 UTC](https://discourse.nodered.org/t/unable-to-install-nodes-of-modbus-and-rs485/61386/1 "2022-04-17T07:16:37Z")

</div>

Hi, everyone~

I have installed Node-RED 2.2.2 by using npm:

> npm install -g --unsafe-perm node-red

Here is the information when it started:

> # Welcome to Node-RED
> 
> 17 Apr 14:54:51 - [info] Node-RED version: v2.2.2  
> 17 Apr 14:54:51 - [info] Node.js version: v16.14.0  
> 17 Apr 14:54:51 - [info] Linux 5.4.0-91-generic x64 LE  
> 17 Apr 14:54:51 - [info] Loading palette nodes  
> 17 Apr 14:54:51 - [info] Settings file : /home/ant/.node-red/settings.js  
> 17 Apr 14:54:51 - [info] Context store : 'default' [module=memory]  
> 17 Apr 14:54:51 - [info] User directory : /home/ant/.node-red

Then when I tried to install nodes of Modbus and RS485, I've got lots of errors and installation failed.

It looks like that "node-red-contrib-serial-modbus v0.11" and "node-red-contrib-serialport-rs485 v0.06" are both too old to use in "Node-RED 2.2.2".

So, is there any way to help me to install these two nodes successfully?

Or, are there any substitution nodes of RS485 and MODBUS that I could use?

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![jinx](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jinx](https://discourse.nodered.org/u/jinx)\
**Post date:** [17 April 2022 07:18 UTC](https://discourse.nodered.org/t/unable-to-install-nodes-of-modbus-and-rs485/61386/2 "2022-04-17T07:18:33Z")

</div>

Most of logs are like this:

```auto
> Installing RS485 node:
> npm ERR! /home/ant/.cache/node-gyp/16.14.0/include/node/v8.h:3081:43: note: candidate expects 1 argument, 0 provided
> npm ERR! ../src/serialport.cpp:535:53: error: no matching function for call to ‘v8::Value::ToObject()’
> npm ERR! 535 | v8::Local<v8::Object> options = info[1]->ToObject();
> ------------------
> Installing MODBUS node:
> npm ERR! /home/ant/.cache/node-gyp/16.14.0/include/node/v8.h:3961:37: note: candidate expects 3 arguments, 2 provided
> npm ERR! /home/ant/.cache/node-gyp/16.14.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
> npm ERR! 3964 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
> npm ERR! | ^~~
> npm ERR! /home/ant/.cache/node-gyp/16.14.0/include/node/v8.h:3964:37: note: candidate expects 3 arguments, 2 provided
> npm ERR! ../src/serialport.cpp:330:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
> npm ERR! 330 | results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));

```

---

<div class="post-metadata">

**Author:** ![MountainKing91](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mountainking91/32/59516_2.png) [@MountainKing91](https://discourse.nodered.org/u/MountainKing91)\
**Post date:** [17 April 2022 08:12 UTC](https://discourse.nodered.org/t/unable-to-install-nodes-of-modbus-and-rs485/61386/3 "2022-04-17T08:12:58Z")

</div>

Hi,  
Are you on windows right?  
Take a look at node-red-contrib-modbus here

[https://flows.nodered.org/node/node-red-contrib-modbus](https://flows.nodered.org/node/node-red-contrib-modbus)

I have used it only with nodejs 14 lts, it should work with 16 too

---

<div class="post-metadata">

**Author:** ![jinx](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jinx](https://discourse.nodered.org/u/jinx)\
**Post date:** [17 April 2022 08:53 UTC](https://discourse.nodered.org/t/unable-to-install-nodes-of-modbus-and-rs485/61386/4 "2022-04-17T08:53:49Z")

</div>

Thanks for your reply~~

In fact I have tried and failed to install those two nodes both on linux and windows .

But , the link you post really help me to solve the MODBUS node problem. Thanks ☺

Now only the RS485 node need to be solved 😙

---

<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:** [16 June 2022 08:54 UTC](https://discourse.nodered.org/t/unable-to-install-nodes-of-modbus-and-rs485/61386/5 "2022-06-16T08:54:27Z")

</div>

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