jinx
1
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
jinx
2
Most of logs are like this:
> 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));
Hi,
Are you on windows right?
Take a look at node-red-contrib-modbus here
https://flows.nodered.org/node/node-red-contrib-modbus
I have used it only with nodejs 14 lts, it should work with 16 too
jinx
4
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
system
Closed
5
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.