# Problems distributing subflows to node red instances

**URL:** <https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213>\
**Category:** General\
**Created:** [24 March 2025 10:40 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213 "2025-03-24T10:40:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [24 March 2025 10:40 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/1 "2025-03-24T10:40:12Z")

</div>

Having some issues today, want to copy a group of subflows from one node red instance to other instances. But getting different error messages.

**Error** : TypeError: o is undefined

Also got another error earlier that said something like "cannot add subflow to itself".

I think this all has to do with the underlying IDs. Is there any way to view and manage these? Suspect there may be some conflicts. Any suggestions on how to move forward? Making the subflows by hand is going to take hours and will almost guaranteed include bugs.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 March 2025 11:19 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/2 "2025-03-24T11:19:30Z")

</div>

Ok, sounds confusing.

Sorry, but for me these questions need answering:

ALL MACHINES:

- What version of NR
- Node.js

It complicates things if you have different versions on different machines.  
Or: _Can_.

Explain to us how you are exporting and importing the `subflow`.

Maybe screenshots at the appropriate times. (With arrows showing what buttons you pressed)

There is a _trick_ when importing existing nodes with newer versions which was put in late in the scheme of things.

But if you are new to here, this may not be a problem.

_But: questions not asked are not always good and IF you are using an older version this may not be there and that causes problems._

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [24 March 2025 13:06 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/3 "2025-03-24T13:06:06Z")

</div>

Thanks, and sorry forgot to provide the details. All have NR v4.0.9 and Node.js v22. It's easier to distribute docker containers than subflows hehe. I'm exporting with ctrl+e, copy-pasting the json for the subflow (including subflow's subflows). And import by ctr+i.

---

<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:** [24 March 2025 13:09 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/4 "2025-03-24T13:09:03Z")

</div>

and upon importing, did see this?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/721306f41d2f18fe41a0ab11cf799836750f1d99.png)

Did you click "view nodes"

![chrome_yPHVzRi96w](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/7/57558a98cba613546554b698b0461c9d810db3a1.gif)

where you can evaluate the outcome and have the option of update/replace etc?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 March 2025 13:09 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/5 "2025-03-24T13:09:24Z")

</div>

You are above my skill set.

Sorry.

I see Steve is replying.

I hope he can help you more than I can.

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [24 March 2025 13:14 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/6 "2025-03-24T13:14:16Z")

</div>

Yes I specifically clicked view nodes to make sure I didn't overwrite existing subflows, because I need to double check how they are used and apply them manually. Their interface changed.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/8048ea686acaf971ca5dc1d85118a39a8306f324.png)

Then I get this:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/4/d43501a6a359212bcc5132bddeca8251100651ac.png)

---

<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:** [24 March 2025 13:18 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/7 "2025-03-24T13:18:30Z")

</div>

ok, cool.

Can I suggest you raise an issue please?

What we would need to replicate & debug this...

1. Your original flows.json file
2. The flows you were importing
3. Screenshot any errors in the browser console and node-red console
4. A link back to this thread for tracking purposes.
5. A step by step (what you clicked/typed/press/in what order) please.

Obviously if you can make the flows file as small as possible (remove as many nodes as possible) while demonstrating the issue would be ideal. (also, be sure to sanitise where necessary).

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [24 March 2025 13:20 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/8 "2025-03-24T13:20:12Z")

</div>

Thanks, I'll see what I can do and post issue. It will be no sooner than tomorrow though.

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [25 March 2025 12:39 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/9 "2025-03-25T12:39:42Z")

</div>

I started cutting down on content to make a small isolated example. But when I tried to import today, it suddenly started to work again! I don't think target node red changed anything, but the source was restarted and heavily modified flows.json multiple times.

So for now, the problem is gone. I'll see if it re-appears later for the remaining node red instances.

Thanks again for your help.

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [25 March 2025 12:46 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/10 "2025-03-25T12:46:01Z")

</div>

However, I get this weird error that some subflows used within a subflow changed type entirely from http node to bacnet node 😲 So I have to manually check everywhere to see that nodes are of correct type. Seems like there is some conflict with IDs?

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [25 March 2025 13:15 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/11 "2025-03-25T13:15:10Z")

</div>

And another problem, I exported and imported to another node red. This time I got the correct nodes, but some other function nodes and an exception node disappeared in the import! So again manual check if all nodes and wires are correct.

---

<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:** [23 June 2025 13:15 UTC](https://discourse.nodered.org/t/problems-distributing-subflows-to-node-red-instances/96213/12 "2025-06-23T13:15:41Z")

</div>

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