Hello,
I try to install 'node-red-contrib-serial-modbus' within the official docker image on a rpi 4b and get the following error messages. I've also read the other topics for this node but this didn't solved my problem.
Maybe someone can help with this problem.
Here are the docker logs with the installed versions and hardware info:
output of 'docker logs nodered'
24 Aug 06:26:02 - [info]
Welcome to Node-RED
===================
24 Aug 06:26:02 - [info] Node-RED version: v3.0.2
24 Aug 06:26:02 - [info] Node.js version: v16.20.1
24 Aug 06:26:02 - [info] Linux 6.1.21-v8+ arm64 LE
24 Aug 06:26:04 - [info] Loading palette nodes
24 Aug 06:26:05 - [info] Settings file : /data/settings.js
24 Aug 06:26:05 - [info] Context store : 'default' [module=memory]
24 Aug 06:26:05 - [info] User directory : /data
24 Aug 06:26:05 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Aug 06:26:05 - [info] Flows file : /data/flows.json
24 Aug 06:26:06 - [info] Server now running at http://127.0.0.1:1880/
The install log for the node is here:
2023-08-24T08:38:23.638Z Install : node-red-contrib-serial-modbus 0.0.11
2023-08-24T08:38:23.720Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-serial-modbus@0.0.11
2023-08-24T08:38:24.893Z [err] npm
2023-08-24T08:38:24.894Z [err] WARN config
2023-08-24T08:38:24.895Z [err] production Use `--omit=dev` instead.
2023-08-24T08:38:41.196Z [err] npm
2023-08-24T08:38:41.196Z [err] ERR! code 1
2023-08-24T08:38:41.197Z [err] npm ERR!
2023-08-24T08:38:41.197Z [err] path /data/node_modules/node-red-contrib-serial-modbus/node_modules/@serialport/bindings
2023-08-24T08:38:41.202Z [err] npm ERR! command failed
2023-08-24T08:38:41.202Z [err] npm ERR! command
2023-08-24T08:38:41.202Z [err] sh -c -- prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2023-08-24T08:38:41.203Z [err] npm ERR! make: Entering directory '/data/node_modules/node-red-contrib-serial-modbus/node_modules/@serialport/bindings/build'
2023-08-24T08:38:41.203Z [err] npm ERR!
2023-08-24T08:38:41.203Z [err] CXX(target) Release/obj.target/bindings/src/serialport.o
2023-08-24T08:38:41.203Z [err] npm ERR! make: Leaving directory '/data/node_modules/node-red-contrib-serial-modbus/node_modules/@serialport/bindings/build'
2023-08-24T08:38:41.203Z [err] npm ERR! gyp info it worked if it ends with ok
2023-08-24T08:38:41.203Z [err] npm
2023-08-24T08:38:41.204Z [err] ERR! gyp info using node-gyp@9.1.0
2023-08-24T08:38:41.204Z [err] npm ERR!
2023-08-24T08:38:41.204Z [err] gyp info using node@16.20.1 | linux | arm64
2023-08-24T08:38:41.204Z [err] npm ERR!
2023-08-24T08:38:41.204Z [err] gyp info find Python using Python version 3.11.4 found at "/usr/bin/python3"
2023-08-24T08:38:41.204Z [err] npm ERR! gyp info spawn /usr/bin/python3
2023-08-24T08:38:41.204Z [err] npm ERR! gyp info spawn args [
2023-08-24T08:38:41.204Z [err] npm ERR!
2023-08-24T08:38:41.205Z [err] gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args 'binding.gyp',
2023-08-24T08:38:41.205Z [err] npm ERR!
2023-08-24T08:38:41.205Z [err] gyp info spawn args '-f',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args 'make',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '-I',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '/data/node_modules/node-red-contrib-serial-modbus/node_modules/@serialport/bindings/build/config.gypi',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '-I',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '-I',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '/usr/src/node-red/.cache/node-gyp/16.20.1/include/node/common.gypi',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '-Dlibrary=shared_library',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '-Dvisibility=default',
2023-08-24T08:38:41.205Z [err] npm ERR! gyp info spawn args '-Dnode_root_dir=/usr/src/node-red/.cache/node-gyp/16.20.1',
2023-08-24T08:38:41.206Z [err] npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
2023-08-24T08:38:41.206Z [err] npm ERR! gyp info spawn args '-Dnode_lib_file=/usr/src/node-red/.cache/node-gyp/16.20.1/<(target_arch)/node.lib',
2023-08-24T08:38:41.206Z [err] npm ERR! gyp info spawn args '-Dmodule_root_dir=/data/node_modules/node-red-contrib-serial-modbus/node_modules/@serialport/bindings',
2023-08-24T08:38:41.206Z [err] npm ERR! gyp info spawn args '-Dnode_engine=v8',
2023-08-24T08:38:41.206Z [err] npm
2023-08-24T08:38:41.206Z [err] ERR! gyp info spawn args '--depth=.',
2023-08-24T08:38:41.206Z [err] npm ERR! gyp info spawn args '--no-parallel',
2023-08-24T08:38:41.206Z [err] npm
2023-08-24T08:38:41.206Z [err] ERR! gyp info spawn args '--generator-output',
2023-08-24T08:38:41.206Z [err] npm ERR! gyp info spawn args 'build',
2023-08-24T08:38:41.207Z [err] npm ERR! gyp info spawn args '-Goutput_dir=.'
2023-08-24T08:38:41.207Z [err] npm ERR! gyp info spawn args ]
2023-08-24T08:38:41.207Z [err] npm ERR! gyp info spawn make
2023-08-24T08:38:41.207Z [err] npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
2023-08-24T08:38:41.207Z [err] npm ERR!
2023-08-24T08:38:41.207Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)':
2023-08-24T08:38:41.207Z [err] npm ERR! ../src/serialport.cpp:78:51: 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]
2023-08-24T08:38:41.207Z [err] npm ERR! 78 | uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
2023-08-24T08:38:41.207Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.207Z [err] npm
2023-08-24T08:38:41.207Z [err] ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)':
2023-08-24T08:38:41.207Z [err] npm ERR! ../src/serialport.cpp:135:53: 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]
2023-08-24T08:38:41.207Z [err] npm ERR! 135 | uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
2023-08-24T08:38:41.207Z [err] npm
2023-08-24T08:38:41.207Z [err] ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.207Z [err] npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)':
2023-08-24T08:38:41.207Z [err] npm
2023-08-24T08:38:41.207Z [err] ERR! ../src/serialport.cpp:175:52: 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]
2023-08-24T08:38:41.207Z [err] npm ERR! 175 | uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
2023-08-24T08:38:41.207Z [err] npm ERR!
2023-08-24T08:38:41.208Z [err] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.208Z [err] npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)':
2023-08-24T08:38:41.208Z [err] npm ERR!
2023-08-24T08:38:41.208Z [err] ../src/serialport.cpp:215:52: 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]
2023-08-24T08:38:41.208Z [err] npm ERR! 215 | uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
2023-08-24T08:38:41.208Z [err] npm ERR!
2023-08-24T08:38:41.208Z [err] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.208Z [err] npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)':
2023-08-24T08:38:41.208Z [err] npm ERR!
2023-08-24T08:38:41.208Z [err] ../src/serialport.cpp:270:50: 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]
2023-08-24T08:38:41.208Z [err] npm ERR! 270 | uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
2023-08-24T08:38:41.208Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.208Z [err] npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)':
2023-08-24T08:38:41.208Z [err] npm ERR! ../src/serialport.cpp:314:50: 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]
2023-08-24T08:38:41.208Z [err] npm
2023-08-24T08:38:41.208Z [err] ERR! 314 | uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
2023-08-24T08:38:41.208Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.208Z [err] npm
2023-08-24T08:38:41.209Z [err] ERR! ../src/serialport.cpp: In function 'void EIO_AfterGet(uv_work_t*)':
2023-08-24T08:38:41.209Z [err] npm ERR! ../src/serialport.cpp:329:17: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)'
2023-08-24T08:38:41.209Z [err] npm
2023-08-24T08:38:41.209Z [err] ERR! 329 | results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
2023-08-24T08:38:41.209Z [err] npm ERR! | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.209Z [err] npm
2023-08-24T08:38:41.209Z [err] ERR! In file included from /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/node.h:73,
2023-08-24T08:38:41.209Z [err] npm ERR! from ../../../../../nan/nan.h:60,
2023-08-24T08:38:41.209Z [err] npm ERR! from ../src/./serialport.h:6,
2023-08-24T08:38:41.209Z [err] npm ERR! from ../src/serialport.cpp:1:
2023-08-24T08:38:41.209Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3961:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)'
2023-08-24T08:38:41.209Z [err] npm ERR! 3961 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
2023-08-24T08:38:41.209Z [err] npm
2023-08-24T08:38:41.209Z [err] ERR! | ^~~
2023-08-24T08:38:41.209Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3961:37: note: candidate expects 3 arguments, 2 provided
2023-08-24T08:38:41.209Z [err] npm
2023-08-24T08:38:41.210Z [err] ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3964:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)'
2023-08-24T08:38:41.210Z [err] npm ERR! 3964 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
2023-08-24T08:38:41.210Z [err] npm
2023-08-24T08:38:41.210Z [err] ERR! | ^~~
2023-08-24T08:38:41.210Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3964:37: note: candidate expects 3 arguments, 2 provided
2023-08-24T08:38:41.210Z [err] npm
2023-08-24T08:38:41.210Z [err] ERR! ../src/serialport.cpp:330:17: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)'
2023-08-24T08:38:41.210Z [err] npm ERR! 330 | results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
2023-08-24T08:38:41.210Z [err] npm
2023-08-24T08:38:41.210Z [err] ERR! | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.210Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3961:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)'
2023-08-24T08:38:41.210Z [err] npm ERR! 3961 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
2023-08-24T08:38:41.210Z [err] npm ERR! | ^~~
2023-08-24T08:38:41.210Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3961:37: note: candidate expects 3 arguments, 2 provided
2023-08-24T08:38:41.210Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3964:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)'
2023-08-24T08:38:41.211Z [err] npm ERR! 3964 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
2023-08-24T08:38:41.211Z [err] npm ERR! | ^~~
2023-08-24T08:38:41.211Z [err] npm ERR!
2023-08-24T08:38:41.211Z [err] /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3964:37: note: candidate expects 3 arguments, 2 provided
2023-08-24T08:38:41.211Z [err] npm ERR! ../src/serialport.cpp:331:17: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)'
2023-08-24T08:38:41.211Z [err] npm ERR!
2023-08-24T08:38:41.211Z [err] 331 | results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
2023-08-24T08:38:41.211Z [err] npm ERR! | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.211Z [err] npm ERR!
2023-08-24T08:38:41.211Z [err] /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3961:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)'
2023-08-24T08:38:41.211Z [err] npm ERR! 3961 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
2023-08-24T08:38:41.211Z [err] npm ERR!
2023-08-24T08:38:41.211Z [err] | ^~~
2023-08-24T08:38:41.211Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3961:37: note: candidate expects 3 arguments, 2 provided
2023-08-24T08:38:41.211Z [err] npm ERR!
2023-08-24T08:38:41.211Z [err] /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3964:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)'
2023-08-24T08:38:41.211Z [err] npm ERR! 3964 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
2023-08-24T08:38:41.211Z [err] npm ERR!
2023-08-24T08:38:41.212Z [err] | ^~~
2023-08-24T08:38:41.212Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3964:37: note: candidate expects 3 arguments, 2 provided
2023-08-24T08:38:41.212Z [err] npm ERR!
2023-08-24T08:38:41.212Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)':
2023-08-24T08:38:41.212Z [err] npm ERR! ../src/serialport.cpp:363:58: 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]
2023-08-24T08:38:41.212Z [err] npm ERR!
2023-08-24T08:38:41.212Z [err] 363 | uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
2023-08-24T08:38:41.212Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.212Z [err] npm
2023-08-24T08:38:41.212Z [err] ERR! ../src/serialport.cpp: In function 'void EIO_AfterGetBaudRate(uv_work_t*)':
2023-08-24T08:38:41.212Z [err] npm ERR! ../src/serialport.cpp:378:17: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)'
2023-08-24T08:38:41.212Z [err] npm
2023-08-24T08:38:41.212Z [err] ERR! 378 | results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
2023-08-24T08:38:41.212Z [err] npm ERR! | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.212Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3961:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)'
2023-08-24T08:38:41.212Z [err] npm ERR! 3961 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
2023-08-24T08:38:41.212Z [err] npm ERR! | ^~~
2023-08-24T08:38:41.212Z [err] npm ERR!
2023-08-24T08:38:41.213Z [err] /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3961:37: note: candidate expects 3 arguments, 2 provided
2023-08-24T08:38:41.213Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3964:37: note: candidate: 'v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)'
2023-08-24T08:38:41.213Z [err] npm ERR!
2023-08-24T08:38:41.213Z [err] 3964 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
2023-08-24T08:38:41.213Z [err] npm ERR! | ^~~
2023-08-24T08:38:41.213Z [err] npm ERR!
2023-08-24T08:38:41.213Z [err] /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/v8.h:3964:37: note: candidate expects 3 arguments, 2 provided
2023-08-24T08:38:41.213Z [err] npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)':
2023-08-24T08:38:41.213Z [err] npm ERR!
2023-08-24T08:38:41.213Z [err] ../src/serialport.cpp:409:52: 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]
2023-08-24T08:38:41.213Z [err] npm ERR! 409 | uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
2023-08-24T08:38:41.213Z [err] npm
2023-08-24T08:38:41.213Z [err] ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.213Z [err] npm ERR! ../src/serialport.cpp: At global scope:
2023-08-24T08:38:41.213Z [err] npm
2023-08-24T08:38:41.213Z [err] ERR! ../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of 'ToParityEnum' [-Wparentheses]
2023-08-24T08:38:41.213Z [err] npm ERR! 430 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
2023-08-24T08:38:41.213Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.213Z [err] npm ERR! ../src/serialport.cpp:430:28: note: remove parentheses
2023-08-24T08:38:41.214Z [err] npm ERR! 430 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
2023-08-24T08:38:41.214Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.214Z [err] npm ERR! | - -
2023-08-24T08:38:41.214Z [err] npm ERR! ../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of 'ToStopBitEnum' [-Wparentheses]
2023-08-24T08:38:41.214Z [err] npm ERR! 449 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
2023-08-24T08:38:41.214Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.214Z [err] npm
2023-08-24T08:38:41.214Z [err] ERR! ../src/serialport.cpp:449:30: note: remove parentheses
2023-08-24T08:38:41.214Z [err] npm ERR!
2023-08-24T08:38:41.214Z [err] 449 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
2023-08-24T08:38:41.214Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.214Z [err] npm ERR!
2023-08-24T08:38:41.214Z [err] | - -
2023-08-24T08:38:41.214Z [err] npm ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/node.h:887:7: 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]
2023-08-24T08:38:41.214Z [err] npm ERR!
2023-08-24T08:38:41.215Z [err] 887 | (node::addon_register_func) (regfunc), \
2023-08-24T08:38:41.215Z [err] npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-24T08:38:41.215Z [err] npm
2023-08-24T08:38:41.215Z [err] ERR! /usr/src/node-red/.cache/node-gyp/16.20.1/include/node/node.h:921:3: note: in expansion of macro 'NODE_MODULE_X'
2023-08-24T08:38:41.215Z [err] npm ERR! 921 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
2023-08-24T08:38:41.215Z [err] npm
2023-08-24T08:38:41.215Z [err] ERR! | ^~~~~~~~~~~~~
2023-08-24T08:38:41.215Z [err] npm ERR! ../src/serialport.cpp:483:1: note: in expansion of macro 'NODE_MODULE'
2023-08-24T08:38:41.215Z [err] npm
2023-08-24T08:38:41.215Z [err] ERR! 483 | NODE_MODULE(serialport, init);
2023-08-24T08:38:41.215Z [err] npm ERR! | ^~~~~~~~~~~
2023-08-24T08:38:41.215Z [err] npm
2023-08-24T08:38:41.215Z [err] ERR! make: *** [bindings.target.mk:114: Release/obj.target/bindings/src/serialport.o] Error 1
2023-08-24T08:38:41.215Z [err] npm ERR! gyp ERR! build error
2023-08-24T08:38:41.215Z [err] npm
2023-08-24T08:38:41.215Z [err] ERR! gyp ERR! stack Error: `make` failed with exit code: 2
2023-08-24T08:38:41.215Z [err] npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
2023-08-24T08:38:41.215Z [err] npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
2023-08-24T08:38:41.215Z [err] npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
2023-08-24T08:38:41.216Z [err] npm ERR! gyp ERR! System Linux 6.1.21-v8+
2023-08-24T08:38:41.216Z [err] npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2023-08-24T08:38:41.216Z [err] npm ERR! gyp ERR! cwd /data/node_modules/node-red-contrib-serial-modbus/node_modules/@serialport/bindings
2023-08-24T08:38:41.216Z [err] npm ERR!
2023-08-24T08:38:41.216Z [err] gyp ERR! node -v v16.20.1
2023-08-24T08:38:41.216Z [err] npm ERR! gyp ERR! node-gyp -v v9.1.0
2023-08-24T08:38:41.216Z [err] npm ERR!
2023-08-24T08:38:41.216Z [err] gyp ERR! not ok
2023-08-24T08:38:41.222Z [err]
2023-08-24T08:38:41.223Z [err] npm ERR! A complete log of this run can be found in:
2023-08-24T08:38:41.223Z [err] npm
2023-08-24T08:38:41.225Z [err] ERR! /data/.npm/_logs/2023-08-24T08_38_24_807Z-debug-0.log
2023-08-24T08:38:41.252Z rc=1