After exporting all flows hundreds of syntax error when importing?

Hello,

i am a bit desperate because i don't want to loose all my flows :roll_eyes:

This is what happened:
Menu -> Export -> All Flows -> Copy to clipboard -> Paste to Github (as comment)

Then i reinstalled my server and tried to import the flows to a new NodeRed install but getting syntax errors.

Did i do something wrong? How do i fix that problem?

I appreciate every feedback.

ED

Flow too long to post it. So i uploaded it in a json file.
Flows.txt (86.4 KB)

It looks like you have got lots of extra newline characters there. How are you copying it back? Perhaps clone it locally and move the file into the .node-red folder, and rename it.

When you go to your GitHub page, do you see a raw button? Click that to see unformatted/original values.

2 Likes

Okay. Now i see what happened. I paste it as a comment to one of my Gists on Github. So i guess the github comment section formatted it. And now i am in this mess.
But i can't find out what Github did to that code. I don't see anything wrong with it. Hmm

Paste it again to an editor that can handle pure text, then maybe you will see what is wrong and you can do search & replace if necessary. I personally use UltraEdit

You should be able to edit the comment on the gist to get the unaltered raw text.

Unfortunately i don't have the original code any more :frowning:

Huff.... smart thinking. That did the job. Thanks a lot :+1:

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