# Updating outdated components

**URL:** <https://discourse.nodered.org/t/updating-outdated-components/36600>\
**Category:** General\
**Created:** [26 November 2020 22:53 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600 "2020-11-26T22:53:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cathprotech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cathprotech/32/7913_2.png) [@Cathprotech](https://discourse.nodered.org/u/Cathprotech)\
**Post date:** [26 November 2020 22:53 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600/1 "2020-11-26T22:53:58Z")

</div>

I just read the thread [MQTT Nodes stopped working] and used 'npm outdated' to see what is out of date on my system.  
Seems quite a lot.  
Question is, how do I update these and do I need to?  
I cannot remember how I installed them in the first place on my Pi3b so any help how to, if I need to please.

Martin

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6e2a08e576b2e9560325c0dfe2354bc0ad5c4207.png)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [26 November 2020 23:00 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600/2 "2020-11-26T23:00:15Z")

</div>

To begin with, you can use the same script you used to install Node-RED originally upgrade to the latest Node-RED - [https://nodered.org/docs/getting-started/raspberrypi#installing-and-upgrading-node-red](https://nodered.org/docs/getting-started/raspberrypi#installing-and-upgrading-node-red)

Once you've updated Node-RED to the latest (1.2.6), you can them upgrade the nodes.

You can do that by either opening the Palette Manager in the editor and clicking the 'upgrade' button against each one, or you `npm install <name of module>` in `~/.node-red` for each of the nodes you want to update.

---

<div class="post-metadata">

**Author:** ![Cathprotech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cathprotech/32/7913_2.png) [@Cathprotech](https://discourse.nodered.org/u/Cathprotech)\
**Post date:** [26 November 2020 23:08 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600/3 "2020-11-26T23:08:20Z")

</div>

Excellent, thanks.  
I'll give it a go

---

<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:** [26 November 2020 23:28 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600/4 "2020-11-26T23:28:45Z")

</div>

After using the script, also do a `npm outdated -g` in case you have any globally installed modules that also need updating.

And maybe do a `sudo apt update && sudo apt upgrade` as well if you haven't. In fact, generally I find it best to do that first.

It is generally best to do these things regularly. Both Linux and the node.js/Node-RED environments are quite fast-moving.

---

<div class="post-metadata">

**Author:** ![Cathprotech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cathprotech/32/7913_2.png) [@Cathprotech](https://discourse.nodered.org/u/Cathprotech)\
**Post date:** [26 November 2020 23:34 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600/5 "2020-11-26T23:34:43Z")

</div>

Ok, updated the nodes and just finished updateing Node Red. Seems like I am now on 1.2.6  
Next I will go through your instruction Julian.  
Regarding the Pi, I regularly do the update/upgrades, so that is ok (I hope).  
Thanks

---

<div class="post-metadata">

**Author:** ![Cathprotech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cathprotech/32/7913_2.png) [@Cathprotech](https://discourse.nodered.org/u/Cathprotech)\
**Post date:** [26 November 2020 23:44 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600/6 "2020-11-26T23:44:28Z")

</div>

Ok, so an npm outdated with and without the -g option shows:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d87bc2a95078812623ee817d4e77ea87ac57a94.png)

---

<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:** [28 November 2020 15:20 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600/7 "2020-11-28T15:20:56Z")

</div>

If you are running pretty much any npm command without the `-g` then you should do it from within your .node-red folder (or wherever your node-red app resides). Otherwise it is meaningless. The reason is that when run local (ie not global) it looks at nodes installed from the current folder.

---

<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:** [27 January 2021 15:20 UTC](https://discourse.nodered.org/t/updating-outdated-components/36600/8 "2021-01-27T15:20:57Z")

</div>

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