After upgrading my nodered image to the latest version I ended up with nodered 2.0.1 and my flow using rfxcom was no longer working. Looking in the logs I see the following:
I am not sure if this a bug or a carryover problem from the nodered 1 version. Backed my docker image out to latest-10 and it worker again. Can anybody tell me if this is a bug or a carryover problem.
The default docker image for Node-RED 2.x uses Node 14. The previous docker image used Node 10. You will need to reinstall or rebuild the rxfcomm node in order to get the serialport node's binary components rebuilt for the newer version of node.
Worth noting that something is triggering a warning in Node-RED. Took me a while to realise this was rfxcom. It relates to the underlying library and there is an issue raised there.
(node:16376) Warning: Accessing non-existent property 'AsyncConfig' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16376) Warning: Accessing non-existent property 'AsyncData' of module exports inside circular dependency
With node.js trace turned on, you get:
(node:13050) Warning: Accessing non-existent property 'AsyncConfig' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:675:11)
at Object.get (internal/modules/cjs/loader.js:689:5)
at Object.<anonymous> (/home/home/nrmain/data/node_modules/rfxcom/lib/index.js:337:43)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/home/home/nrmain/data/node_modules/rfxcom/index.js:1:18)
(node:13050) Warning: Accessing non-existent property 'AsyncData' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:675:11)
at Object.get (internal/modules/cjs/loader.js:689:5)
at Object.<anonymous> (/home/home/nrmain/data/node_modules/rfxcom/lib/index.js:342:41)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/home/home/nrmain/data/node_modules/rfxcom/index.js:1:18)
It doesn't stop anything from working & it isn't related to Node-RED v2 at all.
Hmm - I thought I’d fixed that one? It’s possible I didn’t get round to publishing it though. I can confirm it’s not NR2 related: I haven’t had time to touch rfxcom in months
OK, after recreating the nodered container (with latest, so nodered2) without the flows using rfxcom, and manual install node-red-contrib-rfxcom followed by import of the flows using rfxcom, everything works under nodered2. So it was a carry-over problem from nodered 1. Its is running happily on nodered2 now.