hassio-addons/addon-node-red



The issue has been closed
Node Red won't function with the node-red-contrib-rfxcom npm package any more #628
jag100UK posted onGitHub
Problem
NodeRed disables all flows when then node-red-contrib-rfxcom package is installed using the configuration page.. This doesn't just affect flows that use RFXCom, all flows are affected.
Expected behavior
Flows should run
Actual behavior
All flows are disabled and the following popup apears
Flows stopped due to missing node types.
rfxtrx-port rfx-detector-in rfx-doorbell-in rfx-sensor rfx-lights-in rfx-blinds-in rfx-meter
Steps to reproduce
Add the following configuration
npm_packages:
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:
- node-red-contrib-rfxcom
init_commands: []
When starting, the following appears in the log:-
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Add-on: Node-RED
Flow-based programming for the Internet of Things
-----------------------------------------------------------
Add-on version: 7.0.0
You are running the latest version of this add-on.
System: Ubuntu 20.04 LTS (amd64 / qemux86-64)
Home Assistant Core: 0.113.0
Home Assistant Supervisor: 229
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing...
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing...
[15:05:27] INFO: Password is NOT in the Have I Been Pwned database! Nice!
patching file nodes/ui_base.html
Hunk #1 succeeded at 1177 (offset 646 lines).
up to date in 1.319s
found 0 vulnerabilities
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing...
[15:05:29] INFO: Starting installation of custom NPM/Node-RED packages...
> serialport@9.0.0 postinstall /opt/node_modules/serialport
> node thank-you.js
Thank you for using serialport!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/serialport/donate
+ node-red-contrib-rfxcom@2.11.1
added 5 packages from 4 contributors and audited 1074 packages in 6.018s
37 packages are looking for funding
run `npm fund` for details
found 4 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[15:05:36] INFO: Starting Node-RED...
> addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
23 Jul 15:05:37 - [info]
Welcome to Node-RED
===================
23 Jul 15:05:37 - [info] Node-RED version: v1.1.0
23 Jul 15:05:37 - [info] Node.js version: v12.17.0
23 Jul 15:05:37 - [info] Linux 5.4.0-42-generic x64 LE
23 Jul 15:05:37 - [info] Loading palette nodes
23 Jul 15:05:38 - [info] Dashboard version 2.22.1 started at /endpoint/ui
/bin/sh: /opt/node_modules/node-red-node-pi-gpio/testgpio.py: not found
23 Jul 15:05:38 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
23 Jul 15:05:38 - [warn] ------------------------------------------------------
23 Jul 15:05:38 - [warn] [node-red-contrib-rfxcom/rfxcom] Error: Cannot find module '@serialport/bindings'
Require stack:
- /opt/node_modules/serialport/lib/index.js
- /opt/node_modules/rfxcom/lib/rfxcom.js
- /opt/node_modules/rfxcom/lib/index.js
- /opt/node_modules/rfxcom/index.js
- /opt/node_modules/node-red-contrib-rfxcom/rfxcom.js
- /opt/node_modules/@node-red/registry/lib/loader.js
- /opt/node_modules/@node-red/registry/lib/index.js
- /opt/node_modules/@node-red/runtime/lib/nodes/index.js
- /opt/node_modules/@node-red/runtime/lib/index.js
- /opt/node_modules/node-red/lib/red.js
- /opt/node_modules/node-red/red.js
23 Jul 15:05:38 - [warn] ------------------------------------------------------
23 Jul 15:05:38 - [info] Settings file : /etc/node-red/config.js
23 Jul 15:05:38 - [info] Context store : 'default' [module=memory]
23 Jul 15:05:38 - [info] User directory : /config/node-red/
23 Jul 15:05:38 - [warn] Projects disabled : editorTheme.projects.enabled=false
23 Jul 15:05:38 - [info] Flows file : /config/node-red/flows.json
23 Jul 15:05:38 - [info] Server now running at http://127.0.0.1:46836/
23 Jul 15:05:38 - [info] Waiting for missing types to be registered:
23 Jul 15:05:38 - [info] - rfxtrx-port
23 Jul 15:05:38 - [info] - rfx-detector-in
23 Jul 15:05:38 - [info] - rfx-doorbell-in
23 Jul 15:05:38 - [info] - rfx-sensor
23 Jul 15:05:38 - [info] - rfx-lights-in
23 Jul 15:05:38 - [info] - rfx-blinds-in
23 Jul 15:05:38 - [info] - rfx-meter
[15:05:38] INFO: Starting NGinx...
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
Proposed changes
I suspect the issue is something to do with an npm package named SerialPort or one of its dependencies not being compatible. Please advise a workaround