# Dashboard-2 custom nodes not loading when installed globally

**URL:** <https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [12 January 2025 13:35 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546 "2025-01-12T13:35:31Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [12 January 2025 13:35 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/1 "2025-01-12T13:35:31Z")

</div>

This has been discussed in [https://discourse.nodered.org/t/dashboard-2-question/89759](https://discourse.nodered.org/t/dashboard-2-question/89759) but addressed a very specific use-case.

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?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [12 January 2025 14:18 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/2 "2025-01-12T14:18:50Z")

</div>

I suggest that you link (`npm link`) your global dependencies in the `package.json` file in the `.node-red` folder.

The goal is that the `package.json` file contains a path to load the contrib.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 January 2025 16:01 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/3 "2025-01-12T16:01:15Z")

</div>

> [@omrid](#):
>
> when installed globally

Why are you installing them globally? This is generally not a great idea.

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [12 January 2025 16:42 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/4 "2025-01-12T16:42:52Z")

</div>

> [@TotallyInformation](#):
>
> Why are you installing them globally? This is generally not a great idea.

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)

---

<div class="post-metadata">

**Author:** ![Roland](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Roland](https://discourse.nodered.org/u/Roland)\
**Post date:** [12 January 2025 17:10 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/5 "2025-01-12T17:10:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Roland](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Roland](https://discourse.nodered.org/u/Roland)\
**Post date:** [12 January 2025 17:31 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/6 "2025-01-12T17:31:26Z")

</div>

I forgot - I can supply my ideas (flows) if it would help - but they are on d1 not yet ported to d2

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [13 January 2025 09:01 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/7 "2025-01-13T09:01:40Z")

</div>

> [@omrid](#):
>
> 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)

You guys have looked at [FlowFuse](https://flowfuse.com/), right? It includes:

- Pipelines for pushing between Dev, Test & Production environments
- Team Library for shared nodes and configurations
- Snapshots for version control
- Centralised management of all your Node-RED instances, whether hosted by FlowFuse, or running at the edge with remote access.
- Custom Node-RED node catalogs for managing and distributing your own custom nodes

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [13 January 2025 09:36 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/8 "2025-01-13T09:36:17Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [13 January 2025 09:47 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/9 "2025-01-13T09:47:55Z")

</div>

To be register, it has to be loaded, that's the whole problem.

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [13 January 2025 11:39 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/10 "2025-01-13T11:39:28Z")

</div>

The node loads properly (on the server-side) and works correctly, including passing messages etc. It also registers itself to the dashboard UI:

```auto
        // 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.

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [13 January 2025 13:47 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/11 "2025-01-13T13:47:20Z")

</div>

> [@omrid](#):
>
> 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.

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?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [13 January 2025 14:01 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/12 "2025-01-13T14:01:11Z")

</div>

> [@joepavitt](#):
>
> 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.

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 February 2025 14:01 UTC](https://discourse.nodered.org/t/dashboard-2-custom-nodes-not-loading-when-installed-globally/94546/13 "2025-02-12T14:01:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
