# Upgrade from 1.2.9 to 2.1.3

**URL:** <https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446>\
**Category:** General\
**Created:** [9 November 2021 10:22 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446 "2021-11-09T10:22:54Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [9 November 2021 10:22 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/1 "2021-11-09T10:22:54Z")

</div>

Hi all,

I'm afraid to upgrade from 1.2.9 Nodered to 2.1.3.  
I want to know if there is some node that become not compatible with the last version of node red ? Some things to check before upgrade ?

Also, how to delete all nodes in nodered to have a empty/defaut state like "New Project" in many software ?

Thank you very much,

---

<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:** [9 November 2021 10:45 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/2 "2021-11-09T10:45:01Z")

</div>

The important thing is to have a good backup. You should be backing up everything in the .node-red folder except the node\_modules folder. Then you can always go back to where you were.

What hardware and OS are you running on and what does this command show  
`node -v`

---

<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:** [9 November 2021 10:49 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/3 "2021-11-09T10:49:58Z")

</div>

> [@corso66](#):
>
> how to delete all nodes in nodered to have a empty/defaut state like "New Project" in many software ?

Do you also want to remove any additional nodes you have installed? If so then you can delete (or rename in case you want to go back) the .node-red folder and that will remove everything. When you start node-red again it will recreate it with an empty flows file.  
If you want additional nodes still to be installed then just remove the flows file, which will be flows.json or flows\_servername.json. and the credentials file, which will be the same but with \_cred before .json. If you have made any changes to settings.js then remove that too.  
Before doing that make sure you have a good backup as I said.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [9 November 2021 11:40 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/4 "2021-11-09T11:40:27Z")

</div>

I have installed node red with snap. Terminal said me command no found, install it with apt install nodejs.

My node red to upgrade run in a laptop local with a Ubuntu Studio linux.

---

<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:** [9 November 2021 12:07 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/5 "2021-11-09T12:07:05Z")

</div>

> [@corso66](#):
>
> I have installed node red with snap

I don't know anything about installing with snap.

> [@corso66](#):
>
> Terminal said me command no found, install it with apt install nodejs.

It must be embedded in the snap then.

The usual method of installing on Ubuntu/Debian/Raspbian is [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

Did you find the .node-red folder and the flows file etc? Check the dates on the flow file to make sure it is the correct one.

I don't know of any reason that you should not remove the snap and then install using the script in the link. Then you will be using the method that most here know about. If you do that when you start node-red it appears you have lost your flows then do not panic, it is just that it is not looking at the right file. We can sort that out easily.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [9 November 2021 12:43 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/6 "2021-11-09T12:43:00Z")

</div>

> [@Colin](#):
>
> > [@corso66](#):
> >
> > I have installed node red with snap
> 
> I don't know anything about installing with snap.
> 
> > [@corso66](#):
> >
> > Terminal said me command no found, install it with apt install nodejs.
> 
> The usual method of installing on Ubuntu/Debian/Raspbian is [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

Yes, it's a best method, i have tested it in a virtual machine. I installed nodered v2.1.3 on a VM, and i will try my flows from v1.2.9.

Good way ?

---

<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:** [9 November 2021 13:51 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/7 "2021-11-09T13:51:04Z")

</div>

If you copy across the whole .node-red folder apart from node\_modules and then go in to that folder and run  
`npm install`  
it will automatically install any additional nodes you had previously installed. Then you just need to restart node-red.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [9 November 2021 13:59 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/8 "2021-11-09T13:59:56Z")

</div>

Ok, to be clear :

1°) I save all .node-red folder without node\_modules folder from Nodered v1.2.9  
2°) I replace original .node-red folder of v2.1.3 by my saved .node-red from v1.2.9  
3°) I execute npm instal (this will install any nodes i had added)  
4°) I restart Node-red  
5°) That all ?

---

<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:** [9 November 2021 14:14 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/9 "2021-11-09T14:14:43Z")

</div>

Yes (but install, not instal). Run the install in the .node-red folder. npm reads package.json and package-lock.json and installs any additional nodes specified in there.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [9 November 2021 21:42 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/10 "2021-11-09T21:42:13Z")

</div>

Thank you, i try it.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [9 November 2021 22:37 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/11 "2021-11-09T22:37:14Z")

</div>

Okay, i did the job. I have this message after npm install command :

```auto
sylvain@sylvain-VirtualBox:~/.node-red$ npm install
added 290 packages from 315 contributors and audited 290 packages in 20.333s

16 packages are looking for funding
  run `npm fund` for details

found 1 moderate severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

```

I tryed to fix with npm audit fix :

```auto
npm WARN node-red-contrib-ui-clock@1.0.1 requires a peer of node-red-dashboard@^2.23.2 but none is installed. You must install peer dependencies yourself.

up to date in 4.856s

16 packages are looking for funding
  run `npm fund` for details

fixed 0 of 1 vulnerability in 290 scanned packages
  1 vulnerability required manual review and could not be updated

```

and see details with npm audit :

```auto
=== npm audit security report ===                        
                                                                                
┌──────────────────────────────────────────────────────────────────────────────┐
│ Manual Review │
│ Some vulnerabilities require your attention to resolve │
│ │
│ Visit https://go.npm.me/audit-guide for additional guidance │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate │ Prototype Pollution in minimist │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ minimist │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=0.2.1 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ node-red-node-email │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ node-red-node-email > poplib > optimist > minimist │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://github.com/advisories/GHSA-vh95-rmgr-6w4m │
└───────────────┴──────────────────────────────────────────────────────────────┘
found 1 moderate severity vulnerability in 290 scanned packages
  1 vulnerability requires manual review. See the full report for details.

```

Is "node-red-node-email" has problem ?

---

<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:** [9 November 2021 22:38 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/12 "2021-11-09T22:38:56Z")

</div>

None of those audit warnings is relevant - you can ignore them.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [9 November 2021 23:06 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/13 "2021-11-09T23:06:40Z")

</div>

Ok, tk you 😉

However, after this method, my flows.json content has not present in node red. I have done an import from nodered manualy. Normal ?

---

<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:** [10 November 2021 07:10 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/14 "2021-11-10T07:10:26Z")

</div>

When you start node red it tells you which flows file it is using. Either rename your old file to that name, or edit settings.js to use your old file.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [10 November 2021 14:09 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/15 "2021-11-10T14:09:30Z")

</div>

Ok i undersand.

```auto
    // The file containing the flows. If not set, it defaults to flows_<hostname>.json
    //flowFile: 'flows.json',

```

At this time, my flows from 1.2.9 is running well on 2.1.3.

Tank you very much all.

---

<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:** [24 November 2021 14:09 UTC](https://discourse.nodered.org/t/upgrade-from-1-2-9-to-2-1-3/53446/16 "2021-11-24T14:09:43Z")

</div>

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