node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

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

Open colinl opened this issue 1 year ago • 1 comments

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

  • Dashboard version: 1.11.1
  • Node-RED version: 4.0.0 beta 4
  • Node.js version: 20.5.1
  • npm version:
  • Platform/OS:
  • Browser: Edge

Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

colinl avatar Jun 02 '24 07:06 colinl

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

joepavitt avatar Jun 12 '24 15:06 joepavitt

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)

Paul-Reed avatar Sep 20 '24 18:09 Paul-Reed

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.

joepavitt avatar Sep 20 '24 18:09 joepavitt

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.

Steve-Mcl avatar Sep 20 '24 19:09 Steve-Mcl

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

joepavitt avatar Sep 20 '24 19:09 joepavitt

It does seem repeatable;

  • Uninstall the node
  • Restart node-RED
  • Install the node again

Same result

Paul-Reed avatar Sep 20 '24 19:09 Paul-Reed

@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 )

Steve-Mcl avatar Sep 21 '24 07:09 Steve-Mcl