# How do I update to node \>14.0.0?

**URL:** <https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385>\
**Category:** General\
**Created:** [29 September 2022 12:36 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385 "2022-09-29T12:36:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 12:36 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/1 "2022-09-29T12:36:44Z")

</div>

My setup is RPI-4B  
VERSION="10 (buster)"  
NR: v3.0.2  
node: 12.22.12  
npm: 6.14.16

I'm trying to install some new nodes in NR v3.0.2 and get a message saying I need node.js \>14.0.0

I've tried various scripts to update node.js - but had zero success.

Could someone point me to where I can find some official instructions on how to do this?

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [29 September 2022 12:44 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/2 "2022-09-29T12:44:30Z")

</div>

If you use the official install script put --node14 or --node16 at end and it will install that node version for you  
[Edit] that's two dashes

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 12:46 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/3 "2022-09-29T12:46:46Z")

</div>

I tried that and still ended-up with version 12.  
I'll try it again - just to make sure it wasn't finger trouble.

Do you mean this command line instruction??  
If so, I've just tried it and it remains at v12.22.12

**sudo npm install -g --unsafe-perm node-red --node16**

I have managed to update npm to 8.19.2

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 September 2022 12:55 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/4 "2022-09-29T12:55:41Z")

</div>

Not that, use the bash command

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

```

And add a space then —node16

Note: I did this from my phone and the two dash’s come out looking like a solid line

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [29 September 2022 12:57 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/5 "2022-09-29T12:57:26Z")

</div>

too slow, what @zenofmud said, doesn't hurt your node red install or flows, will just update node js, assuming you have the latest node red install already  
[edit] that's what took me so long, had to fire up laptop to look for whole bash command, was using phone too

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 13:02 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/6 "2022-09-29T13:02:22Z")

</div>

Thanks guys - just tried that. Still node.js 12.22.12 even though the script said installing v16  
 ![update](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/4/d4b8bc717178bc07d77fc95bc18ef09b75f180ca.png)  
 ![restart](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/3/93c9a77604a6e1e9021984a1d16fb29dd8db31fd.png)  
It's also reverted to npm 6.14.16

Is the issue related to the fact that I'm using Buster - which is not the latest OS release ??

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [29 September 2022 13:05 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/7 "2022-09-29T13:05:13Z")

</div>

Are you using the  
node -v command?

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 13:06 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/8 "2022-09-29T13:06:23Z")

</div>

Yep

![node_V](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/589d41c709b30d57b13740d8f469c9ea085dfd5b.png)

---

<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:** [29 September 2022 13:07 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/9 "2022-09-29T13:07:54Z")

</div>

> [@dynamicdave](#):
>
> I'm trying to install some new nodes in NR v3.0.2 and get a message saying I need node.js \>14.0.0

That is poor. The current LTS for node-red is 14 isn't it? You shouldn't really need to go beyond that unless you are testing something that will be introduced when node-red v4 is published.

---

<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:** [29 September 2022 13:08 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/10 "2022-09-29T13:08:35Z")

</div>

> [@dynamicdave](#):
>
> Yep

Have you used `n` or `nvm` at all?

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [29 September 2022 13:08 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/11 "2022-09-29T13:08:58Z")

</div>

If you have any gasoline pour a cup on the board and apply lit match. Otherwise you are going to have to wait for a better mind than mine, that's all I got.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 13:09 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/12 "2022-09-29T13:09:15Z")

</div>

I tried --node14 earlier, and got the same result.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 13:10 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/13 "2022-09-29T13:10:15Z")

</div>

> [@TotallyInformation](#):
>
> Have you used `n` or `nvm` at all?

Can you elaborate a bit more for me?

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 13:10 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/14 "2022-09-29T13:10:55Z")

</div>

Thanks for your help 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:** [29 September 2022 13:12 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/15 "2022-09-29T13:12:23Z")

</div>

> [@dynamicdave](#):
>
> I tried --node14 earlier, and got the same result.

I'm afraid that this is why I don't use things like Dave's excellent script. I'd rather understand and be able to take direct control. I use the node.js Debian repo so I can update with just `sudo apt update && sudo apt upgrade` with a major version upgrade just needing a changeover of the repo.

> [@dynamicdave](#):
>
> Can you elaborate a bit more for me?

They are node.js version managers. Let you have multiple versions installed and switch between them. Causes all manner of confusion.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 13:17 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/16 "2022-09-29T13:17:49Z")

</div>

Just tried the official script with --node14 at the end.  
Still no success, even though the script says it is installing 14 LTS  
 ![update_v14](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/05c59ea2cbdd074c4c2aff9ecb2b09062c511360.png)

---

<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:** [29 September 2022 14:02 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/17 "2022-09-29T14:02:20Z")

</div>

Try doing:

```auto
home@home:~$ whereis node.js
node: /usr/bin/node /usr/include/node /usr/share/man/man1/node.1.gz

```

See if it throws up some additional versions

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [29 September 2022 14:13 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/18 "2022-09-29T14:13:07Z")

</div>

Have a look at the **nodered-install.log** , this should reveal the problem.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 14:32 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/19 "2022-09-29T14:32:49Z")

</div>

There is this line in the log - is that relevant?

## Confirming "" is supported...

- curl -sLf -o /dev/null '[https://deb.nodesource.com/node\_14.x/dists//Release](https://deb.nodesource.com/node_14.x/dists//Release)'

## Your distribution, identified as "", is not currently supported, please contact NodeSource at [GitHub · Where software is built](https://github.com/nodesource/distributions/issues) if you think this is incorr$

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 September 2022 14:37 UTC](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385/20 "2022-09-29T14:37:38Z")

</div>

Here's the first part of the log file. Not sure what to do next..

Already have nodejs v16.15.0  
OLD nodejs 16 :  
NEW nodejs 14 :

* * *

Started : Thu 29 Sep 14:20:58 BST 2022  
Running for user pi at /home/pi  
Found global nodes: :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...  
Building dependency tree...  
Reading state information...  
Package 'nodered' is not installed, so not removed  
0 upgraded, 0 newly installed, 0 to remove and 159 not upgraded.  
Installing nodejs 14

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...  
Building dependency tree...  
Reading state information...  
Package 'npm' is not installed, so not removed  
The following packages will be REMOVED:  
nodejs  
Traceback (most recent call last):  
File "/usr/bin/apt-listchanges", line 30, in   
import apt\_pkg  
ModuleNotFoundError: No module named 'apt\_pkg'  
0 upgraded, 0 newly installed, 1 to remove and 158 not upgraded.  
After this operation, 115 MB disk space will be freed.  
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database$  
Removing nodejs (16.15.0-deb-1nodesource1) ...  
dpkg: warning: while removing nodejs, directory '/usr/lib/node\_modules/npm/docs/output/using-npm' not empty so not removed  
dpkg: warning: while removing nodejs, directory '/usr/lib/node\_modules/npm/node\_modules/emoji-regex' not empty so not removed  
dpkg: warning: while removing nodejs, directory '/usr/lib/node\_modules/npm/node\_modules/@tootallnate/once' not empty so not removed  
dpkg: warning: while removing nodejs, directory '/usr/lib/node\_modules/npm/node\_modules/brace-expansion' not empty so not removed

[Next page](https://discourse.nodered.org/t/how-do-i-update-to-node-14-0-0/68385.md?page=2)
