# After exporting all flows hundreds of syntax error when importing?

**URL:** <https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309>\
**Category:** General\
**Created:** [16 December 2021 17:49 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309 "2021-12-16T17:49:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![EDsteve](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@EDsteve](https://discourse.nodered.org/u/EDsteve)\
**Post date:** [16 December 2021 17:49 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/1 "2021-12-16T17:49:30Z")

</div>

Hello,

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

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.

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

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](https://discourse.nodered.org/uploads/short-url/rLkJui0HKuOm6sdELEhGwvCDzrn.txt) (86.4 KB)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 December 2021 18:11 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/2 "2021-12-16T18:11:29Z")

</div>

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.

---

<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:** [16 December 2021 20:41 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/3 "2021-12-16T20:41:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EDsteve](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@EDsteve](https://discourse.nodered.org/u/EDsteve)\
**Post date:** [17 December 2021 03:26 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/4 "2021-12-17T03:26:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [17 December 2021 06:24 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/5 "2021-12-17T06:24:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [17 December 2021 07:18 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/6 "2021-12-17T07:18:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EDsteve](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@EDsteve](https://discourse.nodered.org/u/EDsteve)\
**Post date:** [17 December 2021 07:42 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/7 "2021-12-17T07:42:01Z")

</div>

Unfortunately i don't have the original code any more ☹

---

<div class="post-metadata">

**Author:** ![EDsteve](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@EDsteve](https://discourse.nodered.org/u/EDsteve)\
**Post date:** [17 December 2021 07:43 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/8 "2021-12-17T07:43:47Z")

</div>

Huff.... smart thinking. That did the job. Thanks a lot 👍

---

<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:** [31 December 2021 07:44 UTC](https://discourse.nodered.org/t/after-exporting-all-flows-hundreds-of-syntax-error-when-importing/55309/9 "2021-12-31T07:44:07Z")

</div>

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