Subflows and `import`... not always working the same

I have (I know it is not a good idea, but this is the situation as it presents itself to me just now) a few different versions of a subflow I wrote on different machines.

I export what I think is the latest and import on the other machine.
I get queried about it, I select the view nodes and then tick the required things and replace it.

All is good.

But then I see that is not the latest. There is one a couple of weeks newer (is that the right term? Anyway...) and so I repeat the process.

But this time when I import and click the view nodes I don't get an option to replace it.

Details:
exporting from NR 2.1.4
importing to NR 2.1.4

Ok. That throws a spanner in the works for my first theory.

First example:

Opening the subflow, the env variables part is blank.
NR 2.1.4

Other machine I see this:

NR 2.1.3

I export it and import it to the other machine and I see this:

I select/tick the replace and it is replaced.

Good.

But then I find an ever newer one.

I won't update it to the intermediate version. I'll just go for an update from the start.

No option to replace.

Sorry, but what am I missing?

It could be that at some point you imported a copy, so the Subflow has a new id - which means when you import a new version with the original id, it doesn't know its a new version so doesn't think there is anything to replace.

On each Node-RED, select an instance of the subflow you are working with, hit Ctrl-E to open the export dialog. Switch to the JSON tab of the dialog. Assuming you only had the subflow instance node selected, then the first entry in the JSON will be the subflow node. Make a note of the id value:

Share the results here - does each Node-RED instance have the same id for the subflow in question? Are they all different? Or a mix?

1 Like

I think that could be the cause.

(Alas what I have done in the mean time is updated the subflow the hard way and copied the code/instructions/etc between the machines.)

(Side question: All screen shots done on same machine. Why is it that 2 of the 3 are ghosted text?)

Though more importantly to the original thing: How do I make them the same number?

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