maxwellhadley / node-red-contrib-rfxcom

node-RED nodes to access an RFXtrx433 transceiver
BSD 2-Clause "Simplified" License
22 stars 13 forks source link

Error when installing, docker on synology nas #99

Open phralh opened 3 years ago

phralh commented 3 years ago

Hi,

I get these errors when trying to install in node-red official docker container on synology nas 718+. I have successfully installed on another synology nas and have tried both the latest node-red, and the previous successful version 10.3.

Any ideas?

2020-07-18T08:30:52.111Z Install : node-red-contrib-rfxcom 2.11.0

2020-07-18T08:30:52.146Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-rfxcom@2.11.0 2020-07-18T08:31:00.464Z [out] 2020-07-18T08:31:00.464Z [out] > @serialport/bindings@9.0.0 install /data/node_modules/@serialport/bindings 2020-07-18T08:31:00.464Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild 2020-07-18T08:31:00.464Z [out] 2020-07-18T08:31:01.387Z [err] prebuild-install 2020-07-18T08:31:01.388Z [err] WARN install No prebuilt binaries found (target=10.17.0 runtime=node arch=x64 libc=musl platform=linux) 2020-07-18T08:31:02.438Z [out] make: Entering directory '/data/node_modules/@serialport/bindings/build' 2020-07-18T08:31:02.439Z [out] CXX(target) Release/obj.target/bindings/src/serialport.o 2020-07-18T08:31:03.807Z [err] In file included from ../src/./serialport.h:6, 2020-07-18T08:31:03.807Z [err] from ../src/serialport.cpp:1: 2020-07-18T08:31:03.807Z [err] ../../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker)': 2020-07-18T08:31:03.807Z [err] ../../../nan/nan.h:2294:62: 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] 2020-07-18T08:31:03.807Z [err] , reinterpret_cast(AsyncExecuteComplete) 2020-07-18T08:31:03.807Z [err] ^ 2020-07-18T08:31:03.872Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)': 2020-07-18T08:31:03.872Z [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] 2020-07-18T08:31:03.872Z [err] uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen); 2020-07-18T08:31:03.872Z [err] ^~~~~ 2020-07-18T08:31:03.878Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)': 2020-07-18T08:31:03.878Z [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] 2020-07-18T08:31:03.878Z [err] uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate); 2020-07-18T08:31:03.878Z [err] ^~~~~~~ 2020-07-18T08:31:03.881Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)': 2020-07-18T08:31:03.881Z [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] 2020-07-18T08:31:03.881Z [err] uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose); 2020-07-18T08:31:03.881Z [err] ^~~~~~ 2020-07-18T08:31:03.884Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)': 2020-07-18T08:31:03.884Z [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] 2020-07-18T08:31:03.884Z [err] uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush); 2020-07-18T08:31:03.884Z [err] ^~~~~~ 2020-07-18T08:31:03.888Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)': 2020-07-18T08:31:03.888Z [err] ../src/serialport.cpp:270: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] 2020-07-18T08:31:03.888Z [err] uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet); 2020-07-18T08:31:03.888Z [err] ^~~~ 2020-07-18T08:31:03.891Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)': 2020-07-18T08:31:03.891Z [err] ../src/serialport.cpp:314: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] 2020-07-18T08:31:03.891Z [err] uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet); 2020-07-18T08:31:03.891Z [err] ^~~~ 2020-07-18T08:31:03.898Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)': 2020-07-18T08:31:03.898Z [err] ../src/serialport.cpp:363: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] 2020-07-18T08:31:03.898Z [err] uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate); 2020-07-18T08:31:03.898Z [err] ^~~~~~~~ 2020-07-18T08:31:03.903Z [err] ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)': 2020-07-18T08:31:03.903Z [err] ../src/serialport.cpp:409: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] 2020-07-18T08:31:03.903Z [err] uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain); 2020-07-18T08:31:03.903Z [err] ^~~~~~ 2020-07-18T08:31:03.908Z [err] ../src/serialport.cpp: At global scope: 2020-07-18T08:31:03.908Z [err] ../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of 'ToParityEnum' [-Wparentheses] 2020-07-18T08:31:03.908Z [err] SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local& v8str)) { 2020-07-18T08:31:03.908Z [err] ^ 2020-07-18T08:31:03.909Z [err] ../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of 'ToStopBitEnum' [-Wparentheses] 2020-07-18T08:31:03.909Z [err] SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) { 2020-07-18T08:31:03.909Z [err] ^ 2020-07-18T08:31:03.911Z [err] In file included from ../../../nan/nan.h:56, 2020-07-18T08:31:03.911Z [err] from ../src/./serialport.h:6, 2020-07-18T08:31:03.911Z [err] from ../src/serialport.cpp:1: 2020-07-18T08:31:03.911Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/node.h:573:43: warning: cast between incompatible function types from 'void ()(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void ()(v8::Local)'} to 'node::addon_register_func' {aka 'void ()(v8::Local, v8::Local, void)'} [-Wcast-function-type] 2020-07-18T08:31:03.911Z [err] (node::addon_register_func) (regfunc), \ 2020-07-18T08:31:03.911Z [err] ^ 2020-07-18T08:31:03.911Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/node.h:607:3: note: in expansion of macro 'NODE_MODULE_X' 2020-07-18T08:31:03.911Z [err] NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) 2020-07-18T08:31:03.911Z [err] ^~~~~ 2020-07-18T08:31:03.911Z [err] ../src/serialport.cpp:483:1: note: in expansion of macro 'NODE_MODULE' 2020-07-18T08:31:03.911Z [err] NODE_MODULE(serialport, init); 2020-07-18T08:31:03.911Z [err] ^~~ 2020-07-18T08:31:03.975Z [err] In file included from /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/node.h:63, 2020-07-18T08:31:03.975Z [err] from ../../../nan/nan.h:56, 2020-07-18T08:31:03.975Z [err] from ../src/./serialport.h:6, 2020-07-18T08:31:03.975Z [err] from ../src/serialport.cpp:1: 2020-07-18T08:31:03.975Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': 2020-07-18T08:31:03.975Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/node_object_wrap.h:84:78: required from here 2020-07-18T08:31:03.975Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] 2020-07-18T08:31:03.975Z [err] reinterpret_cast(callback), type); 2020-07-18T08:31:03.975Z [err] ^~~~~~~~ 2020-07-18T08:31:03.998Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': 2020-07-18T08:31:03.998Z [err] ../../../nan/nan_object_wrap.h:65:61: required from here 2020-07-18T08:31:03.998Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] 2020-07-18T08:31:05.689Z [out] CXX(target) Release/obj.target/bindings/src/serialport_unix.o 2020-07-18T08:31:07.060Z [err] In file included from ../src/serialport.h:6, 2020-07-18T08:31:07.060Z [err] from ../src/serialport_unix.cpp:2: 2020-07-18T08:31:07.060Z [err] ../../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker)': 2020-07-18T08:31:07.060Z [err] ../../../nan/nan.h:2294:62: 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] 2020-07-18T08:31:07.060Z [err] , reinterpret_cast(AsyncExecuteComplete) 2020-07-18T08:31:07.060Z [err] ^ 2020-07-18T08:31:07.196Z [err] In file included from /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/node.h:63, 2020-07-18T08:31:07.196Z [err] from ../../../nan/nan.h:56, 2020-07-18T08:31:07.196Z [err] from ../src/serialport.h:6, 2020-07-18T08:31:07.196Z [err] from ../src/serialport_unix.cpp:2: 2020-07-18T08:31:07.196Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': 2020-07-18T08:31:07.196Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/node_object_wrap.h:84:78: required from here 2020-07-18T08:31:07.196Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] 2020-07-18T08:31:07.196Z [err] reinterpret_cast(callback), type); 2020-07-18T08:31:07.196Z [err] ^~~~~~~~ 2020-07-18T08:31:07.219Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': 2020-07-18T08:31:07.219Z [err] ../../../nan/nan_object_wrap.h:65:61: required from here 2020-07-18T08:31:07.219Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] 2020-07-18T08:31:07.537Z [out] CXX(target) Release/obj.target/bindings/src/poller.o 2020-07-18T08:31:08.900Z [err] In file included from ../src/poller.cpp:1: 2020-07-18T08:31:08.900Z [err] ../../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker)': 2020-07-18T08:31:08.900Z [err] ../../../nan/nan.h:2294:62: 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] 2020-07-18T08:31:08.900Z [err] , reinterpret_cast(AsyncExecuteComplete) 2020-07-18T08:31:08.900Z [err] ^ 2020-07-18T08:31:09.028Z [err] In file included from /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/node.h:63, 2020-07-18T08:31:09.028Z [err] from ../../../nan/nan.h:56, 2020-07-18T08:31:09.028Z [err] from ../src/poller.cpp:1: 2020-07-18T08:31:09.028Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': 2020-07-18T08:31:09.028Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/node_object_wrap.h:84:78: required from here 2020-07-18T08:31:09.028Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] 2020-07-18T08:31:09.028Z [err] reinterpret_cast(callback), type); 2020-07-18T08:31:09.028Z [err] ^~~~~~~~ 2020-07-18T08:31:09.050Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': 2020-07-18T08:31:09.050Z [err] ../../../nan/nan_object_wrap.h:65:61: required from here 2020-07-18T08:31:09.050Z [err] /usr/src/node-red/.cache/node-gyp/10.17.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] 2020-07-18T08:31:09.774Z [out] CXX(target) Release/obj.target/bindings/src/serialport_linux.o 2020-07-18T08:31:09.850Z [out] SOLINK_MODULE(target) Release/obj.target/bindings.node 2020-07-18T08:31:09.904Z [out] COPY Release/bindings.node 2020-07-18T08:31:09.910Z [out] make: Leaving directory '/data/node_modules/@serialport/bindings/build' 2020-07-18T08:31:09.942Z [out] 2020-07-18T08:31:09.942Z [out] > serialport@9.0.0 postinstall /data/node_modules/serialport 2020-07-18T08:31:09.942Z [out] > node thank-you.js 2020-07-18T08:31:09.942Z [out] 2020-07-18T08:31:10.083Z [out] Thank you for using serialport! 2020-07-18T08:31:10.083Z [out] If you rely on this package, please consider supporting our open collective: 2020-07-18T08:31:10.083Z [out] > https://opencollective.com/serialport/donate 2020-07-18T08:31:10.083Z [out] 2020-07-18T08:31:10.083Z [out] 2020-07-18T08:31:10.452Z [out] + node-red-contrib-rfxcom@2.11.0 2020-07-18T08:31:10.452Z [out] added 86 packages from 49 contributors in 17.261s 2020-07-18T08:31:10.488Z rc=0

maxwellhadley commented 3 years ago

This appears to be a problem with the Serialport package version 9.0.0. It looks like it is using a version of nan.h that is not compatible with Node v 10.17.0 - please raise an issue at https://github.com/serialport/node-serialport/issues. Serialport is used by rfxcom, which node-red-contrib-rfxcom uses

jag100UK commented 3 years ago

I am getting the same issue when using Node-Red in Home Assistant. I've also tried reverting back to previous snapshots but get similar errors.

Is there a way of reverting back to an older version of the previous node-red-contrib-rfxcom npm?

All of my flows in Node Red have been disabled.

Here is a copy of my log

18 Jul 22:03:38 - [info]

Welcome to Node-RED

18 Jul 22:03:38 - [info] Node-RED version: v1.1.0 18 Jul 22:03:38 - [info] Node.js version: v12.17.0 18 Jul 22:03:38 - [info] Linux 5.4.0-40-generic x64 LE 18 Jul 22:03:38 - [info] Loading palette nodes 18 Jul 22:03:39 - [info] Dashboard version 2.22.1 started at /endpoint/ui /bin/sh: /opt/node_modules/node-red-node-pi-gpio/testgpio.py: not found 18 Jul 22:03:39 - [warn] rpi-gpio : Raspberry Pi specific node set inactive 18 Jul 22:03:39 - [warn] ------------------------------------------------------ 18 Jul 22:03:39 - [warn] [node-red-contrib-rfxcom/rfxcom] Error: Cannot find module '@serialport/bindings' Require stack:

maxwellhadley commented 3 years ago

You can revert back to an older version of a package by adding a version specifier to the npm install command:

npm install node-red-contrib-rfxcom@2.10.0

However, this will not fix everything, as the problem is two levels of dependency down:

node-red-contrib-rfxcom --> rfxcom --> serialport

I think you will need to manually roll back node-red-contrib-rfxcom to 2.10.0, then rfxcom to 2.2.0, then serialport to 8.0.8. In each case this has to be done from within the appropriate node_modules directory.

However, as this is a serialport problem, if you don't raise an issue with them it is unlikely to get fixed. I can't help you, but the serialport maintainers should be able to.

jag100UK commented 3 years ago

Thank you for your reply.

Forgive me for my lack of understanding, I'm not a developer and I don't understand what broke or how. I didn't knowingly make any changes before this happened.

What technically do we tell the "Serialport" maintainers?

In your previous message you mention its something incompatible with Node v 10.17.0. I dont know where this is configured, can I revert back to an older version? What settings are you running for it to work?

I've tried putting the followin line in my Node-Red configuration and as you suggested, it doesnt work npm_packages:

I'm not seeing any other posts about this component being broken, which suggests it may be something on my installation.

I appreciate this isn't a Home Assistant forum, but is there anything in my configuration below that jumps out as a possible cause for this suddenly happening?

arch | x86_64 chassis | desktop dev | false docker | true docker_version | 19.03.8 hassio | true host_os | Ubuntu 20.04 LTS installation_type | Home Assistant Supervised os_name | Linux os_version | 5.4.0-40-generic python_version | 3.7.7 supervisor | 229 timezone | Europe/London version | 0.112.4 virtualenv | false

This is my Node-Red configuration as defined in Home Assistant credential_secret: ###### dark_mode: false http_node: username: #### password: #### http_static: username: '' password: '' ssl: true certfile: fullchain.pem keyfile: privkey.pem require_ssl: true system_packages: [] npm_packages:

Many thanks

phralh commented 3 years ago

Hi,

Thanks for the replies. This solved my issue:

Manual installation of serialport@latest worked fine. Moved on to manual installation of node-rfxcom@latest which gave me the error above. Tested a few different versions of node-rfxcom and version 2.1.0 installed without error. Finally moved on to trying a few different versions of node-red-contrib-rfxcom and found that 2.1.1 worked fine on the latest docker image of node-red, version 1.1.2.

Regards Fredrik

maxwellhadley commented 3 years ago

@phralh - I'm not sure I follow you there: do you say node-rfxcom version 2.1.0 with serialport latest (9.0.0) installs OK, but subsequent versions 2.1.1, 2.2.0, and 2.3.0 give the compiler error in your original report? That seems strange. However, I would expect any recent version of node-red-contrib-rfxcom to work OK, give or take a couple of bugs, with that combination. But node-red-contrib-rfxcom version 2.1.1 is very old indeed! Do you mean 2.11.1?

P.S. I'm still on Node-RED 1.0.3 and Node 12.14.0 here - I wonder if that makes a difference?

@jag100UK - I know people have had trouble with Home Assistant installs in the past that they have somehow fixed, though I don't use it myself. In your case it looks as if serialport has not been properly installed for some reason. You might try uninstalling node-red-contrib-rfxcom completely and then re-installing.

The common thread here appears to be the use of Docker: I have never tried using it here myself, might have to set up a test system...

jag100UK commented 3 years ago

For anyone who has this issue using NodeRed on Home Assistant, a fix can be found here

https://github.com/serialport/node-serialport/issues/2111

maxwellhadley commented 3 years ago

To force a complete reinstallation of serialport, including recompiling C++ sources where necessary, when you get an 'incompatible Node versions' message or for any other reason, the most reliable approach seems to be:

cd ~/.node-red
npm uninstall node-red-contrib-rfxcom node-red-node-serialport rfxcom serialport
npm install node-red-contrib-rfxcom node-red-node-serialport

It's best to uninstall all four packages, as it looks like some versions of npm don't follow the dependency chain all the way.

maxwellhadley commented 5 months ago

Version 2.13.0 now published to npm uses serialport 11.x.x, to retain compatibility with NodeJS v14.