# Node Red update failure (to v5.0.0) using script

**URL:** <https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309>\
**Category:** General\
**Created:** [18 June 2026 13:59 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309 "2026-06-18T13:59:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [18 June 2026 13:59 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/1 "2026-06-18T13:59:28Z")

</div>

I was running a version of NR just previous to this v5.0.0 upgrade. I used the following script to update Node Red:

```auto
bash <(curl -sL https://github.com/node-red/linux-installers/releases/latest/download/install-update-nodered-deb)

```

which I got from "Node Red - Getting Started" web page:

[Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

The install script tells me I have Node.js v 20.20.2 and NPM v10.8.2 and Node Red 5.0.0. Does the script not also update Node.js?

I've always used this script with no problems however after trying a couple of times I keep getting the following error (NR log) when I restart Node Red:

> Starting as a systemd service.  
> Started nodered.service - Node-RED graphical event wiring tool.  
> Unsupported version of Node.js: v20.20.2  
> Node-RED requires Node.js v22.9 or later  
> nodered.service: Main process exited, code=exited, status=1/FAILURE  
> nodered.service: Failed with result 'exit-code'.  
> nodered.service: Scheduled restart job, restart counter is at 7.  
> Stopped nodered.service - Node-RED graphical event wiring tool.  
> Started nodered.service - Node-RED graphical event wiring tool.  
> Unsupported version of Node.js: v20.20.2  
> Node-RED requires Node.js v22.9 or later  
> nodered.service: Main process exited, code=exited, status=1/FAILURE  
> nodered.service: Failed with result 'exit-code'.

Any suggestions how to repair this?  
Thanks

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [18 June 2026 14:14 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/2 "2026-06-18T14:14:24Z")

</div>

So I updated Node.js to v24.17.0 using instructions from this site:

> **[Node.js — Download Node.js®](https://nodejs.org/en/download)**
>
> Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.

yet NR still would not start.

`node -v` reports 24.17.0  
`npm -v` reports 11.13.0

I rebooted the system and NR did not automatically start. I used `node-red-start` and the log reports:

> Unsupported version of Node.js: v20.20.2  
> Node-RED requires Node.js v22.9 or later  
> nodered.service: Main process exited, code=exited, status=1/FAILURE  
> nodered.service: Failed with result 'exit-code'.  
> nodered.service: Scheduled restart job, restart counter is at 2.  
> Stopped nodered.service - Node-RED graphical event wiring tool.  
> Started nodered.service - Node-RED graphical event wiring tool.  
> Unsupported version of Node.js: v20.20.2  
> Node-RED requires Node.js v22.9 or later  
> nodered.service: Main process exited, code=exited, status=1/FAILURE  
> nodered.service: Failed with result 'exit-code'.

---

<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:** [18 June 2026 14:16 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/3 "2026-06-18T14:16:15Z")

</div>

Run the script again with ` --node24` on the end (after a space).

I think they're is a fix in the pipeline to warn you that it needs a later nodejs.

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [18 June 2026 14:17 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/4 "2026-06-18T14:17:46Z")

</div>

Thank you Colin, that worked perfectly.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 July 2026 13:38 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/5 "2026-07-11T13:38:24Z")

</div>

I just fell into the same trap - an SD card with an old version of Node-red on it.

I disabled automatic startup (removed the systemd link), deleted the default systemd script and removed the entire ~/.node-red directory.

Then I ran the script with no command line flags. It seemed to run OK but the resulting Node-red v5 will not run because node.js 20.0 was previously installed.

Of course it's simple to re-run with --node24 but I think it's a mistake for the script with default options to leave you with an installation that won't run.

Also, the script output can be misinterpreted

```auto
This script checks if Node.js is installed, and will try to install
Node.js 24 if it is not found.

```

And as @StrongTown discovered, it's easy to go down the wrong route trying to upgrade Node.js.

ps Re-running with --node24 also gives misleading output - "No Node.js detected"

```auto
  Removing any existing Node.js and npm... 
  No Node.js detected - will try to install Node.js 24
  Install Node.js _

```

---

<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:** [11 July 2026 14:14 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/6 "2026-07-11T14:14:19Z")

</div>

> [@jbudd](#):
>
> Re-running with --node24 also gives misleading output - "No Node.js detected"
> 
> ```auto
> Removing any existing Node.js and npm... 
> No Node.js detected - will try to install Node.js 24
> Install Node.js _
> 
> ```

That is a bit misleading, but also correct. There is no nodejs detected because it has just been removed. It would be better if the 'no nodejs detected' bit was not output if it had just been removed by the script.

I also agree it would be good if the script showed a warning if the installed version is too low, with a suggestion as to what to do about it.

---

<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:** [11 July 2026 19:04 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/7 "2026-07-11T19:04:35Z")

</div>

All - apologies - I thought I had fixed those a couple of weeks ago - but it seems the release script failed at the last step and didn't update the "live” version... it should now auto update to 24 if it detects versions earlier than nodejs 22.9 (or to latest 22 if running on Arm v6)

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 July 2026 19:43 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/8 "2026-07-11T19:43:13Z")

</div>

Thanks Dave 😀.

What do you think about a --force option for the script, with the aim of completely replacing an old or broken installation with the latest release?

If --force is specified, provided the OS is 64 bit, [re]install the default node.js (depending on Arm processor version), [re]install the latest Node-red, replace any existing settings.js and systemd scripts with the default, run admin init.

---

<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:** [11 July 2026 20:00 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/9 "2026-07-11T20:00:27Z")

</div>

Pull requests always welcome 🙂

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 July 2026 23:17 UTC](https://discourse.nodered.org/t/node-red-update-failure-to-v5-0-0-using-script/101309/10 "2026-07-11T23:17:56Z")

</div>

Well I tried and failed at "Choose two branches to see what’s changed or to start a new pull request." No idea what that means.

I have raised an issue with proposed code changes. Best I can do.
