Problems distributing subflows to node red instances

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.

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.

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.

and upon importing, did see this?

Did you click "view nodes"

chrome_yPHVzRi96w

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

1 Like

You are above my skill set.

Sorry.

I see Steve is replying.

I hope he can help you more than I can.

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.

Then I get this:
image

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

1 Like

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

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.

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

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.