# Scared of upgrading ancient Node-RED (1.1.3) to 3.x

**URL:** <https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411>\
**Category:** General\
**Created:** [21 July 2022 10:14 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411 "2022-07-21T10:14:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [21 July 2022 10:14 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/1 "2022-07-21T10:14:19Z")

</div>

I have a large and complicated Node-RED system that uses quite a few contrib nodes, some of which haven't received updates in a long time (camerapi, nut-ups, owfs, to name a few), and I'm worried that such a large jump forward might break some of these, or indeed much my own code. At the same time I don't want to remain stuck on 1.x forever. My system has Node.JS 12.8.3 and the Node-RED update bash script suggests going to Node-RED 2.2.2 as a "safe" option, but the `--nodered-version="2.2.2"` command line argument seems to be ignored by the script:

```auto

$ ./update-nodejs-and-nodered --nodered-version="2.2.2"
...
Node-RED v3.x no longer supports Nodejs 12 
  
  You can force an install of node 14, 16 or 18 by using the --node14, --node16 or --node18 parameter.
  However doing so may break some nodes that may need re-installing manually.
  Generally it is recommended to update all nodes to their latest versions before upgrading.
  
  If you wish to stay on nodejs 12 you can update to the latest Node-RED 1.x or 2.x version by adding
  --nodered-version="1.3.7" or --nodered-version="2.2.2" to that install command. If in doubt this is the safer option.
  Please backup your installation and flows before upgrading.
  
  Exiting now.

```

Grateful for suggestions / recommendations!

---

<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:** [21 July 2022 10:18 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/2 "2022-07-21T10:18:35Z")

</div>

Dont be scared - just back up everything, start fresh, import your old flows & try it out.

Start with node-red v3.0.0 and nodejs v16.

If too much is broken that cannot be worked around, try again with nodejs v14 (its slightly more forgiving)

Lastly, if you must, try specifying `--nodered-version="2.2.2" --node12`

* * *

If you cannot get these going, you can always revert to your backup that you made at the start.

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [21 July 2022 12:07 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/3 "2022-07-21T12:07:11Z")

</div>

Thanks, that's reassuring! I decided on a different plan though; I saw that the Pi this is running on is a Pi2 v **1.1** , whereas I do have a spare Pi2 v **1.2** , so I'm thinking imma go for a hardware upgrade as well; the 20-30% extra performance of the A53 over the A7 will be quite useful - and it can be overclocked for _moar_. It's also about time I do a complete rebuild from scratch; the image I'm running is six years old, and a lot of things have changed. I just hope my build notes remain usable as a guide...

While I'm at it, I might even jump to a 64-bit distro, though I'm unsure whether that's a good idea? Everything else being equal, would Node-RED perform better or worse on a 64-bit system compared to a 32-bit one? Given the choice, what would you pick?

---

<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:** [21 July 2022 12:24 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/4 "2022-07-21T12:24:21Z")

</div>

I suspect you would only add to your potential upgrade woes moving to 64bit

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [21 July 2022 13:03 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/5 "2022-07-21T13:03:53Z")

</div>

I suspect you may be right about that - but I'm in the mood for pain today, so I'm going with pre-release [Devuan Daedalus 64](https://arm-files.devuan.org/RaspberryPi%20Latest%20Builds/). What could possibly go wrong!?  
🙈

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [21 July 2022 13:26 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/6 "2022-07-21T13:26:25Z")

</div>

🍿🍿🍿

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [21 July 2022 14:23 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/7 "2022-07-21T14:23:58Z")

</div>

It boots! And only uses 75 MB RAM.

 ![devuan_daedalus_v8_pi2_1.2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/540de5436c85a5125b49c1688602dca0e9682a62.jpeg)

TBC.

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [22 July 2022 12:46 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/8 "2022-07-22T12:46:36Z")

</div>

![Screenshot_2022-07-22_13-23-11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/c/4c5e872f934e36b7729ff81215d2bfed190fd3ea.png)

![Screenshot_2022-07-22_13-27-35](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/1/413d490aba69bf99bd41b7426752ee21d5dbd8f3.png)

TBC.

---

<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:** [22 July 2022 12:56 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/9 "2022-07-22T12:56:29Z")

</div>

looks good

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [22 July 2022 16:16 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/10 "2022-07-22T16:16:34Z")

</div>

First issue encountered: when installing `spi-device` with npm (required by `node-red-contrib-monarco-hat`) I get an error from `nan`

```auto
npm ERR! In file included from ../../nan/nan.h:294,
npm ERR! from ../src/getoptions.cc:4:
npm ERR! ../../nan/nan_new.h: In instantiation of ‘typename Nan::imp::Factory<T>::return_t Nan::New(A0) [with T = v8::Uint32; A0 = long unsigned int; typename Nan::imp::Factory<T>::return_t = v8::Local<v8::Uint32>]’:
npm ERR! ../src/getoptions.cc:35:25: required from here
npm ERR! ../../nan/nan_new.h:208:30: error: call of overloaded ‘New(long unsigned int&)’ is ambiguous
npm ERR! 208 | return imp::Factory<T>::New(arg0);
npm ERR! | ~~~~~~~~~~~~~~~~~~~~^~~~~~
npm ERR! In file included from ../../nan/nan_new.h:189,
npm ERR! from ../../nan/nan.h:294,
npm ERR! from ../src/getoptions.cc:4:
npm ERR! ../../nan/nan_implementation_12_inl.h:177:1: note: candidate: ‘static Nan::imp::FactoryBase<v8::Uint32>::return_t Nan::imp::Factory<v8::Uint32>::New(int32_t)’
npm ERR! 177 | Factory<v8::Uint32>::New(int32_t value) {
npm ERR! | ^ ~~~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_implementation_12_inl.h:183:1: note: candidate: ‘static Nan::imp::FactoryBase<v8::Uint32>::return_t Nan::imp::Factory<v8::Uint32>::New(uint32_t)’
npm ERR! 183 | Factory<v8::Uint32>::New(uint32_t value) {
npm ERR! | ^ ~~~~~~~~~~~~~~~~~~
npm ERR! make: *** [spi.target.mk:119: Release/obj.target/spi/src/getoptions.o] Error 1

```

This looks like a 32/64-bit problem, but I have no idea what to do about it; searching web & git turns up nothing relevant. All other nodes I need have installed without issue, including

node-red-contrib-modbus  
node-red-contrib-nut-ups  
node-red-contrib-os  
node-red-node-pi-gpio  
node-red-contrib-owfs  
node-red-contrib-i2c  
node-red-node-random  
node-red-node-ping  
node-red-contrib-play-audio  
node-red-node-smooth  
node-red-node-serialport

`node-red-node-openweathermap` gives deprecation warnings for `request` and a few others but seems to function anyway.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [22 July 2022 17:06 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/11 "2022-07-22T17:06:40Z")

</div>

> [@clickworkorange](#):
>
> spi-device

What happens if you install nan yourself? Same issues?

BTW, my recommendation was going to be: install a 2nd instance of nr on the latest version and slowly migrate over everything you can. Leave what you can't migrate on the old version and plan for re-writing those bits when time permits. Since you have a 2nd device, this is even easier. I think I've done that approach 3 times now.

---

<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:** [22 July 2022 19:35 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/12 "2022-07-22T19:35:05Z")

</div>

> [@clickworkorange](#):
>
> installing `spi-device` with npm (required by `node-red-contrib-monarco-hat`)

I don't see where in the node docs it says to install that manually.

What version of nodejs are you running?

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [22 July 2022 20:16 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/13 "2022-07-22T20:16:33Z")

</div>

Nono, you misunderstood me, I mean when installing `node-red-contrib-monarco-hat` it falls over while installing the `spi-device` dependency; I did not ask for it to be installed myself.

---

<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:** [22 July 2022 20:19 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/14 "2022-07-22T20:19:11Z")

</div>

Sorry, I misunderstood.

What version of nodejs are you using (`node -v`)

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [22 July 2022 20:20 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/15 "2022-07-22T20:20:08Z")

</div>

```auto
$ node --version
v16.15.1

```

---

<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:** [22 July 2022 20:21 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/16 "2022-07-22T20:21:45Z")

</div>

Did you follow the readme...

> Install prerequisites  
> Install required build-dependencies on your Raspbian running on Raspberry Pi:
> 
> sudo apt update  
> sudo apt install build-essential

Additionally, there is a similar open issue on that repo from a few months back. Maybe add your voice and details to it?

---

<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:** [22 July 2022 20:24 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/17 "2022-07-22T20:24:07Z")

</div>

It installs ok on 64 bit ubuntu with nodejs 16, so it is more subtle than the nodejs version.

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [22 July 2022 20:25 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/18 "2022-07-22T20:25:59Z")

</div>

> [@TotallyInformation](#):
>
> install a 2nd instance of nr on the latest version and slowly migrate over everything you can.

That's exactly what I'm doing, and precisely because I have a second device to do it on. TBH I consider this to be little more than an experiment at this point. If I can make it go; good. If not, at least maybe I've learned something new.

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [22 July 2022 20:27 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/19 "2022-07-22T20:27:21Z")

</div>

> [@Colin](#):
>
> It installs ok on 64 bit ubuntu with nodejs 16, so it is more subtle than the nodejs version.

Is this on an Arm A53 system? The error looks to me like it has to do with 32 vs 64 bit int sizes; could it be something to do with the instruction set?

---

<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:** [22 July 2022 20:29 UTC](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411/20 "2022-07-22T20:29:04Z")

</div>

No, Intel. I was just confirming that it is not the nodejs version, which can often give errors similar to yours if the node is not compatible with later nodejs versions.

[Next page](https://discourse.nodered.org/t/scared-of-upgrading-ancient-node-red-1-1-3-to-3-x/65411.md?page=2)
