the nodes of node-red-flexdash don't show up in the palette
when I instantiate a node from node-red-fd-corewidgets it needs a config node from the other repo, and the input field that should show a drop down with the config nodes or "Add a new config node..." doesn't work
if I go back to the palette manager and manually install node-red-flexdash then its nodes get recognized, become available in the palette, and everything works
Am I doing something wrong or is there a bug or is this "as designed"?
Node-RED log:
Welcome to Node-RED
===================
18 Mar 22:00:38 - [info] Node-RED version: v2.2.2
18 Mar 22:00:38 - [info] Node.js version: v14.18.2
18 Mar 22:00:38 - [info] Linux 5.13.0-27-generic x64 LE
18 Mar 22:00:38 - [info] Loading palette nodes
18 Mar 22:00:39 - [info] Settings file : /data/settings.js
18 Mar 22:00:39 - [info] Context store : 'default' [module=memory]
18 Mar 22:00:39 - [info] User directory : /data
18 Mar 22:00:39 - [warn] Projects disabled : editorTheme.projects.enabled=false
18 Mar 22:00:39 - [info] Flows file : /data/flows.json
18 Mar 22:00:39 - [warn]
18 Mar 22:00:39 - [info] Server now running at http://127.0.0.1:1880/
18 Mar 22:00:39 - [info] Starting flows
18 Mar 22:00:39 - [info] Started flows
18 Mar 22:01:08 - [info] Installing module: @flexdash/node-red-fd-corewidgets, version: 0.1.4
18 Mar 22:01:19 - [info] Installed module: @flexdash/node-red-fd-corewidgets
18 Mar 22:01:19 - [info] Added node types:
18 Mar 22:01:19 - [info] - @flexdash/node-red-fd-corewidgets:date-time
18 Mar 22:01:19 - [info] - @flexdash/node-red-fd-corewidgets:gauge
...
18 Mar 22:01:19 - [info] - @flexdash/node-red-fd-corewidgets:value-sequence
18 Mar 22:01:19 - [info] - @flexdash/node-red-fd-corewidgets:wind-plot
It would be great to get it fixed to support this behaviour.
My lack of enthusiasm was for someone to hack something into their node to try and bypass what we have. Sadly that happens quite often - people choose to do their own thing rather than contribute back.
If this is something you're interested in contributing to, that would be awesome. I'd be happy to give some more detailed pointers - I'm just not in a position to do that right now.
Hmm, trying to understand what's needed. So we land in installModule:
and then it proceeds to addModule, which has the following intriguing loop:
But that already looks at dependencies!? Specifically moduleFiles[moduleToLoad].dependencies and adds those to the stack!? The dependencies seem to be established in
Does that mean all I'm missing is some json in my package.json? E.g. in addition to
Nope, doesn't work. In fact, even if I install the dependency manually that "dependencies" added to package.json will actively prevent the nodes from the dependency from being added to the palette.
node-red-flexdash: core of flexdash, primarily configuration nodes
node-red-flexdash-plugin: flexdash plugin due to bug described in How do Node-RED plugins work? (can't reliably have a plugin and a node in the same pkg)
node-red-fd-corewidgets: core set of widget nodes, really separable from the core of flexdash as someone could install a different set of widgets
node-red-flexdash-sidebar: sidebar for FlexDash, which perhaps should/could be integrated into the node-red-flexdash package, or perhaps not
While the instructions can tell someone to "npm install node-red-fd-corewidgets" and get everything else pulled in as dependencies, due to the bug described here this is not possible through the palette manager: the dependencies get pulled in at the npm level but not their nodes and thus users end up with missing nodes. Instead users have to select all 3 or 4 packages for install manually in the palette manager.
In order to allow the manual install of all the dependencies in the palette manager, I have to publish all these packages in the flow library, which due to the fact that it can't be automated is both painful and error prone (see Script to trigger flow library update after npm publish?)
If I'm missing a solution to all this I'd be grateful to hear!