# Trying to upgrade NR v0.19.? to v0.20.5 on a RPi3+

**URL:** https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978
**Category:** General
**Created:** [10 April 2019 10:30 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978 "2019-04-10T10:30:48Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![karlbaker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karlbaker/32/7422_2.png) [@karlbaker](https://discourse.nodered.org/u/karlbaker)
#### Post date: [10 April 2019 10:30 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/1 "2019-04-10T10:30:48Z")

</div>

Hi,

I have a relatively fresh install on a RPi3+ with a RAZBERRY2 Z-Wave smart home gateway installed. I'm currently running the upgrade using the upgrade script command:

```auto
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

```

from the online documentation. The upgrade has been running for almost 2 hours now, and it appears to be hung at the line "Move global nodes to local".

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bca7d8840cf0348fef3d45975cf900ba7e118311.png)

As I'm new to this there should only be the standard set of nodes installed, and I have not begun any flows yet. The log file in /var/log also has not grown. Could the script be hung? What will I need to do to complete the upgrade manually if I break out of the upgrade?

Thanks,

Karl

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [10 April 2019 10:49 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/2 "2019-04-10T10:49:53Z")

</div>

I'd guess the script has hung.

I'd start by running rebooting and then trying the script again.  
If that doesn't work, the script is just a text file. Open the URL in a web browser and you can see the commands that it runs.

---

<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 April 2019 12:41 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/3 "2019-04-10T12:41:01Z")

</div>

Break in and have a look at the log (the location is on the screenshot you posted). If that doesn't show anything then just run it again.

**[Edit]** In addition, while the upgrade is running, you can open another terminal and run

```bash
tail -f /var/log/nodered-install.log

```

to watch what it is doing.

---

<div class="post-metadata">

### Author: ![karlbaker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karlbaker/32/7422_2.png) [@karlbaker](https://discourse.nodered.org/u/karlbaker)
#### Post date: [10 April 2019 15:41 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/4 "2019-04-10T15:41:40Z")

</div>

I was able to find in the script where it hung, but not why. After breaking out I also found out that the entire node-red installation was gone, and needed to install from the RPi recommended software menu option.

I now have v0.19.4 running, and am moving forward with getting Z-Wave configured.

Thanks for your help.

---

<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 April 2019 15:46 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/5 "2019-04-10T15:46:20Z")

</div>

> [@karlbaker](#):
>
> After breaking out I also found out that the entire node-red installation was gone,

That is because it did not complete. Running the script removes the old version and install the current version. How have you managed to install 0.19.4? The script should install the latest.

---

<div class="post-metadata">

### Author: ![karlbaker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karlbaker/32/7422_2.png) [@karlbaker](https://discourse.nodered.org/u/karlbaker)
#### Post date: [10 April 2019 15:48 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/6 "2019-04-10T15:48:12Z")

</div>

I was able to re-install through the setup / recommended software menu option of gnome.

---

<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 April 2019 15:51 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/7 "2019-04-10T15:51:38Z")

</div>

Good luck with that. They are likely out of date. What versions of nodejs and npm have you got? Which operating system are you using? I assumed you were using Raspbian but that doesn't use Gnome does it?

```bash
npm -v
node -v

```

---

<div class="post-metadata">

### Author: ![karlbaker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karlbaker/32/7422_2.png) [@karlbaker](https://discourse.nodered.org/u/karlbaker)
#### Post date: [10 April 2019 15:55 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/8 "2019-04-10T15:55:45Z")

</div>

npm is v2.14.7  
node is v4.2.1  
Raspbial is Jessie, kernel 4.14.98

The GUI looks to be Gnome, but it could be something different

---

<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 April 2019 18:14 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/9 "2019-04-10T18:14:15Z")

</div>

Node red does not support versions of node prior to 8.x.  
npm is currently at 6.x  
See [https://nodered.org/docs/getting-started/installation](https://nodered.org/docs/getting-started/installation)

You would be well advised to persevere with running the install script, otherwise some things will not work.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [10 April 2019 18:26 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/10 "2019-04-10T18:26:45Z")

</div>

The latest version of Node-RED doesn’t support nodejs prior to v6. But the version of Node-RED you have installed will run on nodejs v4.

The challenge comes in that nodejs v4 isn’t in support anymore so will not be getting any security patches etc.  
Also as @colin suggests nodes you may want to add may assume you are running a more modern version of nodejs and fail to run. I would also encourage to you to try the upgrade script again.

---

<div class="post-metadata">

### Author: ![karlbaker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karlbaker/32/7422_2.png) [@karlbaker](https://discourse.nodered.org/u/karlbaker)
#### Post date: [10 April 2019 19:31 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/11 "2019-04-10T19:31:33Z")

</div>

Thanks for the information guys. I’ll get node and npm updated to the current version and try again.

I’ll let you know how things turn out.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [10 April 2019 19:36 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/12 "2019-04-10T19:36:44Z")

</div>

The script will do that for you if you give it another go

---

<div class="post-metadata">

### Author: ![karlbaker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karlbaker/32/7422_2.png) [@karlbaker](https://discourse.nodered.org/u/karlbaker)
#### Post date: [11 April 2019 11:16 UTC](https://discourse.nodered.org/t/trying-to-upgrade-nr-v0-19-to-v0-20-5-on-a-rpi3/9978/13 "2019-04-11T11:16:28Z")

</div>

Ran the upgrade, this time it went through. OS now shows me  
node -v  
v10.15.3  
nodejs -v  
10.15.3  
(these were showing me differences beforehand)  
npm -v  
v6.4.1

Thanks for your help!
