I am maintaining multiple environments (without using 'projects'). In order to have a common installation, I install nodes globally (using NPM install -g).
I noticed that dashboard-2 custom nodes (e.g. ui-tabulator, ui-iframe etc.) are not recognized by the dashboard client and don't show up when installed globally (I get the error message No vue component found for ui-iframe... in the browser console). When I reinstall them locally, they come up properly.
I use the latest Node-red (4.0.8) dashboard 2 (1.22.0) and node JS 20.15.0.
Any suggestions?
We have Node-red deployed in production at a (very) big Telecom operator, including many community nodes and dozens of self-developed custom nodes. Our backend development setup includes 10s of environments, including dev, test, staging etc., each with multiple flow versions. We want a common installation, so that every time a node has a new version, we don't have to reinstall it across all environments (while still retaining the option to override specific nodes locally on specific environments, for testing new node versions)
Hi, I don't know exactly what happened in the background, but GogoVega mentioned that it only works when there is a path in the package.json to load something belonging to the d2 contrib. (in my case the problem was that I use two package.json - one in the .node directory and the other in a project specific package.json with all specific dependencies of this instance). I solved it in the moment to come further to put all d2 dependencies in the main package.json.
I understand your problem to handle multiple instances. I use some - not so many like you - about 10-15 instances.
It is a problem to handle the changes when you want to deploy a new version. I do it with some flows which give me an overview of the installed packages of these instances, the differences between installed and available versions and to generate a script with npm/npx commands to update all or only specific instances.
Thanks Joe,
We are considering FlowFuse, but in parallel, it would be good if the installation of custom dash-2 nodes will be seamless (like stock nodes) and not require NPM links or package.json editing.
The server node always comes up ok. is there some way it can register itself to the dashboard-2 framework, so that the client will recognize it?
The node loads properly (on the server-side) and works correctly, including passing messages etc. It also registers itself to the dashboard UI:
// which group are we rendering this widget
const group = RED.nodes.getNode(config.group);
//--------------------------------------------------------
// inform the dashboard UI that we are adding this node
//--------------------------------------------------------
if (group) {
group.register(node, config, evts);
} else {
node.error('No group configured');
}
However, when the client browser tries to load the client-side Vue module it fails. I hope there can be a way to pass the dependency info as part of the registration.
I know that @Steve-Mcl had looked at something similar before with Dashboard 2.0 nodes, and thought he'd resolved those issues. Steve - can you remember the details on that?
Unfortunately I dont remember details off the top of my head though I am certain it was something I tried out.
@omrid
if you NPM LINK your instances to the the global installation then proceed to update the global install, the many instances referencing it will also be updated (because it is a link, not a copy). Alternatively, you could also have a shell script that simply iterates your installations and re-runs the npm link (or full install)
Personally, I don't recommend global installs - even for your use case.
In the mean time, please raise an issue with as much detail and a step by step to reproduce.