Failure installing node-red-contrib-rfxcom

Sadly I am way out of my depth with a failure to install the node-red-contrib-rfxcom module. I'm running Node Red v3.0.2 on Dietpi v8.21.1 and Node.js v20.2.0.

2023-09-19T21_49_45_647Z-debug-0.log (127.7 KB)

I can't start to follow the error messages in the log which is attached.

Any advice gratefully received (but please be gentle :slight_smile: )

Hi @jonnyfarmer - Welcome to the forums.

I won't pretend to provide an answer here, but more background to arm you with.

node-red-contrib-rfxcom uses package rfxcom which uses package serialport

And if experience is anything to go by serialport is a very fussy library when it comes to having the correct environment

You log seems to suggest the version of serialport requied is 9.2.8, this is now very dated by the speed at which serialport gets developed, and it seems to have issues with a library of nan.

It could be that your using Node v20 (9.2.8 of serialport was around Node 10) so things have very likely become not compatible in your system.

My suggestion is to ask the author of node-red-contrib-rfxcom to update its dependencies and by extension the author of rfxcom

I Don't know for sure if this is the area at fault - but your log seems to suggest so

697 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
697 error In file included from ../../../nan/nan.h:180,
697 error                  from ../src/./serialport.h:13,
697 error                  from ../src/serialport.cpp:1:
697 error ../../../nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’
697 error    55 | typedef v8::Local<v8::AccessorSignature> Sig;
697 error       |                       ^~~~~~~~~~~~~~~~~
697 error ../../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
697 error    55 | typedef v8::Local<v8::AccessorSignature> Sig;
697 error       |                                        ^
697 error In file included from ../src/./serialport.h:13,

Hi Marcus

Many thanks for the welcome and the prompt reply. Your response makes absolute sense to me - I just couldn't "decode" the log at all. I'll reach out to the author and see what can be done.

Thanks again :slight_smile:

Yesterday I repeatedly couldn't install a Node that I had previously installed a couple of weeks ago. So I did a fresh installation of Node Red on a couple of SD cards today, and discovered that I could only install the node provided I had already done a sudo update and upgrade before attempting to load that particular Node.

This can be a downside to using Dave's great install script. It hides away the actual mechanisms. Great for simplicity and getting doing. Not so great if you have an issue.

Node.js/npm is generally pretty good at sorting things out but there are certainly gottya's.

Serial ports are one of these. They use Node.js's C++ interface and so, if you change Node.js major version, they typically have to be recompiled even if already installed. And C++ dependencies can be a bit more dependent on other OS components/libraries.

@maxwellhadley is the author of the node. I don't think he gets time these days to inhabit the forum so reach out on GitHub. I've been using his node for quite a few years now and it is excellent. Thankfully rarely needs any maintenance.

1 Like

Many thanks for the suggestion, but I had updated and upgraded before trying the install (and after just to be sure!

Many thanks - I'll reach out to @maxwellhadley as you suggest - I have been using the node for many, many years until a hardware failure meant a rebuild of my Node Red machine :frowning:

The serialport package has been the bane of my life in recent times - more so for those using Alpine Linux :sob:

@jonnyfarmer - Sorry you've been having problems. I think it is indeed a Serialport version issue. They do seem to introduce compatibilty-breaking updates with depressing regularity. I'm way behind on package maintenance these days: like @TotallyInformation said I'm very busy and don't have much time for Node-RED (or anything else much, either :frowning: )
There is an update currently in progress, but don't hold your breath. I have checked, and I can confirm there are breaking API changes affecting node-rfxcom when going from 9.x.x to 10.x.x, so I have yet more work to do!

1 Like

@maxwellhadley many thanks for taking the time to respond. I fully understand how busy life can be :slight_smile:

I'll be very grateful (like many people) if you find time to catch up at some point, but in the mean time keep healthy and happy and I'll see if I can build a setup with an old version of OS & Node Red to tide me over!

1 Like

Further to my comments about trying older versions and in case it helps anyone else in the short term, here is what I did to get a Raspberry Pi 3A+ running Node Red and communicating with my RFXtrx433E (running the RFXtrx433E Ext v1028 firmware):

Install DietPi Bullseye on Pi (the DietPi_RPi-ARMv8-Bullseye image, not Bookworm)

Install node red (using dietpi-software - software id 122)

The the following commands in an SSH session:
npm uninstall serialport
apt-get install build-essential
npm install serialport@8.0.8

Then I used the Node Red pallette manager to install node-red-contrib-rfxcom

I don't intend to use this Pi for anything else on Node Red - I'll send the messages to my main Node Red install via MQTT. I'm sure something less than a Pi 3A+ could do the job, but it's what I had to hand that I could sacrifice for the role.

Again, thanks to all who responded above and if anyone has any questions I'll try and help but please keep in mind I'm a real Linux newbie :slight_smile:

2 Likes

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