# Update Node.js to version 14

**URL:** <https://discourse.nodered.org/t/update-node-js-to-version-14/42786>\
**Category:** General\
**Created:** [17 March 2021 19:57 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786 "2021-03-17T19:57:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon01011](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Simon01011](https://discourse.nodered.org/u/Simon01011)\
**Post date:** [17 March 2021 19:57 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/1 "2021-03-17T19:57:01Z")

</div>

Hi!

I have a HomeMatic IP system - RaspberryMatic with RedMatic addon (it has Node.js 14) - which works without problems with node-red-contrib-ccu to control everything.

I want to move to a separate pi that I installed with the command from [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi) and it installes a Node.js version of 12. Unfortunately, with the same version of node-red-contrib-ccu, it is not possible to control the HomeMatic system. Is there a possibility to update my Node.js version to 14? Just for testing, it is not a productive system.

---

<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:** [17 March 2021 20:01 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/2 "2021-03-17T20:01:32Z")

</div>

v14 is an LTS version and is supported by Node-RED. You just need to update node.js however, you should then do:

```auto
cd ~/.node-red
npm rebuild

```

to make sure that all of the compiled libraries are correct.

---

<div class="post-metadata">

**Author:** ![Simon01011](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Simon01011](https://discourse.nodered.org/u/Simon01011)\
**Post date:** [17 March 2021 20:03 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/3 "2021-03-17T20:03:51Z")

</div>

Thank you!

But how should I do it? On the command line with some command? Or adding some repository to the sources.list and use apt-get?

Edit: Ah, found the repo file!

Edit 2: Update was successful, but doesn't solve the problem 😟

---

<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:** [17 March 2021 21:07 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/4 "2021-03-17T21:07:19Z")

</div>

Did you re-install node-red and run `npm rebuild` in the .node-red folder after upgrading nodejs?

---

<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:** [17 March 2021 21:07 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/5 "2021-03-17T21:07:38Z")

</div>

Double-check that Node-RED is using the correct version. It is shown at the start of the log.

---

<div class="post-metadata">

**Author:** ![Simon01011](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Simon01011](https://discourse.nodered.org/u/Simon01011)\
**Post date:** [17 March 2021 21:08 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/6 "2021-03-17T21:08:45Z")

</div>

No, only rebuild, but not re-install. Is that necessary?

---

<div class="post-metadata">

**Author:** ![Simon01011](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Simon01011](https://discourse.nodered.org/u/Simon01011)\
**Post date:** [17 March 2021 21:09 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/7 "2021-03-17T21:09:31Z")

</div>

Yes, that's okay

```auto
17 Mar 21:27:42 - [info]

Willkommen bei Node-RED!
===================

17 Mar 21:27:42 - [info] Node-RED Version: v1.2.9
17 Mar 21:27:42 - [info] Node.js Version: v14.16.0
17 Mar 21:27:42 - [info] Linux 5.10.17-v7+ arm LE
17 Mar 21:27:44 - [info] Paletten-Nodes werden geladen
17 Mar 21:28:00 - [info] node-red-contrib-ccu version: 3.4.2
17 Mar 21:28:00 - [info] Dashboard version 2.28.1 started at /ui
17 Mar 21:28:01 - [info] Einstellungsdatei: /home/pi/.node-red/settings.js
17 Mar 21:28:01 - [info] Kontextspeicher: 'default' [module=memory]
17 Mar 21:28:01 - [info] Benutzerverzeichnis: /home/pi/.node-red
17 Mar 21:28:01 - [warn] Projekte inaktiviert: editorTheme.projects.enabled=false
17 Mar 21:28:01 - [info] Flow-Datei: /home/pi/.node-red/flows_automation.json
17 Mar 21:28:01 - [info] Server wird jetzt auf http://127.0.0.1:1880/ ausgeführt.

```

---

<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:** [17 March 2021 21:10 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/8 "2021-03-17T21:10:40Z")

</div>

Yes, it is necessary to re-install node-red, or at least it is desirable, so that anything in node-red that has to be built is rebuilt using the new version. You can do that with  
`sudo npm install -g --unsafe-perm node-red`

Then restart node-red.

---

<div class="post-metadata">

**Author:** ![Simon01011](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Simon01011](https://discourse.nodered.org/u/Simon01011)\
**Post date:** [17 March 2021 21:16 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/9 "2021-03-17T21:16:27Z")

</div>

Okay, I didn't know that, though it doesn't solve the problem. But I learned something new 😃

---

<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:** [16 May 2021 21:16 UTC](https://discourse.nodered.org/t/update-node-js-to-version-14/42786/10 "2021-05-16T21:16:34Z")

</div>

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