FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
194 stars 46 forks source link

A node red restart is necessary after installing third party ui nodes #938

Closed colinl closed 1 week ago

colinl commented 4 months ago

Current Behavior

If a non-core node such as @flowfuse/node-red-dashboard-2-ui-led is installed then it is necessary to restart node-red in order for the widget to appear on the dashboard. Before the restart the widget appears just as an empty space on the page. It seems that this is also the case for ui-frame and ui-gauge-classic.

Expected Behavior

Either a restart should not be required, or the user should be informed that a restart is required.

Steps To Reproduce

No response

Environment

Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

joepavitt commented 3 months ago

This is something I want to prioritise, as it's very annoying, but will require a re-think on how we load up our third-party plugins

Paul-Reed commented 1 week ago

Still occurring... just imported @hotnipi/node-red-dashboard-2-ui-gauge-linear and which did not load. Chrome's developer console showed -

error

A node-RED restart was required for the node to load. https://discourse.nodered.org/t/good-bye-ui-level-hello-gauge-linear/91144/2

Node-RED v4.0.1 Dashboard 2 v1.17.0)

joepavitt commented 1 week ago

Thanks Paul, this requires a quite significant overhaul on our build pipeline and server-side architecture, which we've not entirely got on top of yet.

Steve-Mcl commented 1 week ago

I am hoping the refactoring I did in #1286 will permit us to get past this?

In theory: we listen for node-red event "type-registered" (RED.event.on('type-registered', type)), see if it is a dashboard nodes, re-run (or check and compare) the new code in #1286

completely untested but worth a look see.

joepavitt commented 1 week ago

@Steve-Mcl Paul did mention he is running 1.17.0, and from what I can tell, that should be included in that release

Paul-Reed commented 1 week ago

It does seem repeatable;

Same result

Steve-Mcl commented 1 week ago

@Steve-Mcl Paul did mention he is running 1.17.0, and from what I can tell, that should be included in that release

The work in that pr was groundwork. I was noting it as a memory aid for when I get on to this issue (I didn't mean to imply it was already solved - sorry guys )