Node-red-contrib-modbus, why those errors appear while installing?

I'm triyng to understand why those errors appear. A node-red installation works well and fast installing and removing nodes from pallette until you install node-red-contrib-modbus. Then package installations stuck for some time on every operation.

-----------------------------------------------------------
2022-01-08T11:02:12.536Z Install : node-red-contrib-modbus 5.16.0

2022-01-08T11:02:12.128Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-modbus@5.16.0
2022-01-08T11:04:45.424Z [out] 
2022-01-08T11:04:45.424Z [out] > @serialport/bindings@9.2.8 install /data/home/root/.node-red/node_modules/@serialport/bindings
2022-01-08T11:04:45.424Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2022-01-08T11:04:45.424Z [out] 
2022-01-08T11:04:49.257Z [err] prebuild-install
2022-01-08T11:04:49.258Z [err]  WARN install No prebuilt binaries found (target=14.17.4 runtime=node arch=arm libc= platform=linux)
2022-01-08T11:04:57.296Z [out] make: Entering directory '/data/home/root/.node-red/node_modules/@serialport/bindings/build'
2022-01-08T11:04:57.301Z [out]   CXX(target) Release/obj.target/bindings/src/serialport.o
2022-01-08T11:05:10.682Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)':
2022-01-08T11:05:10.682Z [err] ../src/serialport.cpp:78:69: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
2022-01-08T11:05:10.682Z [err]    78 |   uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
2022-01-08T11:05:10.682Z [err]       |                                                                     ^~~~~~~~~~~~~
2022-01-08T11:05:10.743Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)':
2022-01-08T11:05:10.743Z [err] ../src/serialport.cpp:135:71: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
2022-01-08T11:05:10.743Z [err]   135 |   uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
2022-01-08T11:05:10.743Z [err]       |                                                                       ^~~~~~~~~~~~~~~
2022-01-08T11:05:10.763Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)':
2022-01-08T11:05:10.763Z [err] ../src/serialport.cpp:175:70: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
2022-01-08T11:05:10.763Z [err]   175 |   uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
2022-01-08T11:05:10.763Z [err]       |                                                                      ^~~~~~~~~~~~~~
2022-01-08T11:05:10.778Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)':
2022-01-08T11:05:10.778Z [err] ../src/serialport.cpp:215:70: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
2022-01-08T11:05:10.778Z [err]   215 |   uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
2022-01-08T11:05:10.778Z [err]       |                                                                      ^~~~~~~~~~~~~~
2022-01-08T11:05:10.801Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)':
2022-01-08T11:05:10.801Z [err] ../src/serialport.cpp:271:68: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
2022-01-08T11:05:10.801Z [err]   271 |   uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
2022-01-08T11:05:10.801Z [err]       |                                                                    ^~~~~~~~~~~~
2022-01-08T11:05:10.817Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)':
2022-01-08T11:05:10.817Z [err] ../src/serialport.cpp:316:68: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
2022-01-08T11:05:10.817Z [err]   316 |   uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
2022-01-08T11:05:10.817Z [err]       |                                                                    ^~~~~~~~~~~~
2022-01-08T11:05:10.908Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)':
2022-01-08T11:05:10.908Z [err] ../src/serialport.cpp:366:76: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
2022-01-08T11:05:10.908Z [err]   366 |   uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
2022-01-08T11:05:10.908Z [err]       |                                                                            ^~~~~~~~~~~~~~~~~~~~
2022-01-08T11:05:10.908Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)':
2022-01-08T11:05:10.908Z [err] ../src/serialport.cpp:412:70: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
2022-01-08T11:05:10.908Z [err]   412 |   uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
2022-01-08T11:05:10.908Z [err]       |                                                                      ^~~~~~~~~~~~~~
2022-01-08T11:05:10.916Z [err] ../src/serialport.cpp: At global scope:
2022-01-08T11:05:10.916Z [err] ../src/serialport.cpp:433:28: warning: unnecessary parentheses in declaration of 'ToParityEnum' [-Wparentheses]
2022-01-08T11:05:10.916Z [err]   433 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
2022-01-08T11:05:10.916Z [err]       |                            ^
2022-01-08T11:05:10.926Z [err] ../src/serialport.cpp:452:30: warning: unnecessary parentheses in declaration of 'ToStopBitEnum' [-Wparentheses]
2022-01-08T11:05:10.926Z [err]   452 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
2022-01-08T11:05:10.926Z [err]       |                              ^
2022-01-08T11:05:10.937Z [err] In file included from ../../../nan/nan.h:58,
2022-01-08T11:05:10.937Z [err]                  from ../src/./serialport.h:13,
2022-01-08T11:05:10.937Z [err]                  from ../src/serialport.cpp:1:
2022-01-08T11:05:10.937Z [err] /home/root/.cache/node-gyp/14.17.4/include/node/node.h:758:43: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
2022-01-08T11:05:10.937Z [err]   758 |       (node::addon_register_func) (regfunc),                          \
2022-01-08T11:05:10.937Z [err]       |                                           ^
2022-01-08T11:05:10.937Z [err] /home/root/.cache/node-gyp/14.17.4/include/node/node.h:792:3: note: in expansion of macro 'NODE_MODULE_X'
2022-01-08T11:05:10.937Z [err]   792 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
2022-01-08T11:05:10.937Z [err]       |   ^~~~~~~~~~~~~
2022-01-08T11:05:10.937Z [err] ../src/serialport.cpp:486:1: note: in expansion of macro 'NODE_MODULE'
2022-01-08T11:05:10.937Z [err]   486 | NODE_MODULE(serialport, init);
2022-01-08T11:05:10.937Z [err]       | ^~~~~~~~~~~
2022-01-08T11:05:23.520Z [out]   CXX(target) Release/obj.target/bindings/src/serialport_unix.o
2022-01-08T11:05:36.746Z [err] ../src/serialport_unix.cpp: In function 'int setup(int, OpenBaton*)':
2022-01-08T11:05:36.746Z [err] ../src/serialport_unix.cpp:179:82: warning: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
2022-01-08T11:05:36.746Z [err]   179 |     snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
2022-01-08T11:05:36.746Z [err]       |                                                                                  ^~
2022-01-08T11:05:36.747Z [err] ../src/serialport_unix.cpp:179:13: note: 'snprintf' output 20 or more bytes (assuming 1043) into a destination of size 1024
2022-01-08T11:05:36.747Z [err]   179 |     snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
2022-01-08T11:05:36.747Z [err]       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-01-08T11:05:36.958Z [err] ../src/serialport_unix.cpp: In function 'void EIO_Open(uv_work_t*)':
2022-01-08T11:05:36.958Z [err] ../src/serialport_unix.cpp:89:84: warning: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1003 [-Wformat-truncation=]
2022-01-08T11:05:36.958Z [err]    89 |     snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
2022-01-08T11:05:36.958Z [err]       |                                                                                    ^~
2022-01-08T11:05:36.959Z [err] ../src/serialport_unix.cpp:89:13: note: 'snprintf' output 22 or more bytes (assuming 1045) into a destination of size 1024
2022-01-08T11:05:36.959Z [err]    89 |     snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
2022-01-08T11:05:36.959Z [err]       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-01-08T11:05:37.657Z [out]   CXX(target) Release/obj.target/bindings/src/poller.o
2022-01-08T11:05:55.205Z [out]   CXX(target) Release/obj.target/bindings/src/serialport_linux.o
2022-01-08T11:05:55.945Z [out]   SOLINK_MODULE(target) Release/obj.target/bindings.node
2022-01-08T11:05:56.773Z [out]   COPY Release/bindings.node
2022-01-08T11:05:56.820Z [out] make: Leaving directory '/data/home/root/.node-red/node_modules/@serialport/bindings/build'
2022-01-08T11:05:58.839Z [out] 
2022-01-08T11:05:58.839Z [out] > node-red-contrib-modbus@5.16.0 postinstall /data/home/root/.node-red/node_modules/node-red-contrib-modbus
2022-01-08T11:05:58.839Z [out] > node ./supporter.js
2022-01-08T11:05:58.839Z [out] 
2022-01-08T11:06:00.465Z [out] e[96me[1mThank you for using our contribution!e[96me[1m
2022-01-08T11:06:00.465Z [out] e[0me[96mIf you rely on this package, please consider supporting our open source work:e[22me[39m
2022-01-08T11:06:00.465Z [out] > e[94mhttps://bianco-royal.space/supporter/e[0m
2022-01-08T11:06:00.465Z [out] 
2022-01-08T11:06:00.465Z [out] 
2022-01-08T11:06:05.530Z [out] + node-red-contrib-modbus@5.16.0
2022-01-08T11:06:05.530Z [out] added 302 packages from 342 contributors in 224.829s
2022-01-08T11:06:05.713Z rc=0

I'm also concerned about the modbus nodes not working completely well because of that.

What version of Node-RED and node.js are you using?

Thanks Knolleary.
This is an embedded Victron Cerbo (PV device) that suits with node-red.
As is, it doesn't let me install build-essential that usually fixes those errors in my other node-red machines.

# node -v
v14.17.4
# npm -v
6.14.14

image

Why not? No space? Errors occur? What errors?

It doesn't let me install anything that doesn't come from the Victron repos. The package manager also is locked down. In fact is opkg.

Maybe you could contact victron, perhaps they have an opkg or would generate a patch?

You could also look into cross compiling for the machines architecture (never done this for node bindings so you'd have to read up on this)

1 Like

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