# Nr update node.js failed

**URL:** <https://discourse.nodered.org/t/nr-update-node-js-failed/58332>\
**Category:** General\
**Created:** [14 February 2022 18:56 UTC](https://discourse.nodered.org/t/nr-update-node-js-failed/58332 "2022-02-14T18:56:06Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [14 February 2022 18:56 UTC](https://discourse.nodered.org/t/nr-update-node-js-failed/58332/1 "2022-02-14T18:56:06Z")

</div>

I'm trying to update my NR setup for a couple of days now with the help of the raspberry bash script.  
NR update to v2.2.0 is no problem, however node.js will not update to v16, it's still v12 This despite the **--node16** option for the bash script to update the raspberry 3B+.

After studding the _nodered-install.log_ I noticed the cryptic error **Error executing command, exiting** not very help full error.

Doing some googling and testing I noticed that apt-get xxxxx will give an error **404 Not Found [IP: 93.93.128.193 80] Err:28 http ://raspbian.raspberrypi.org/raspbian buster/blah blah**  
Most likely this error will also be the cause that node.js will not update.

2 questions;

- Is there a workaround to get node.js updated from another repository?
- Can the error in the bash script made more clear? Preferable in the gui or at least in the error log.

---

<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:** [14 February 2022 20:34 UTC](https://discourse.nodered.org/t/nr-update-node-js-failed/58332/2 "2022-02-14T20:34:03Z")

</div>

Can you post the full result of running  
`sudo apt update && sudo apt full-upgrade`

When pasting the result use the `</>` button at the top of the forum entry window.

---

<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:** [14 February 2022 21:03 UTC](https://discourse.nodered.org/t/nr-update-node-js-failed/58332/3 "2022-02-14T21:03:36Z")

</div>

Yesterday and when started this topic 2 hours ago `sudo apt full-upgrade` gave me the \*_404 not found error_, also after `sudo apt update` to update the repository's.

But now updating is working fine, update of the pi is in progress.  
Will run the update NR bash file tomorrow again to see if node.js will update now. It's now to risky to run the bash, if somethings fails we sitting in the dark due uncontrollable lights and my wife will kill me.

---

<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:** [14 February 2022 22:04 UTC](https://discourse.nodered.org/t/nr-update-node-js-failed/58332/4 "2022-02-14T22:04:40Z")

</div>

That was a temporary network failure then.

You might find that the full-upgrade does the nodejs upgrade for you. It depends how far through it got before the network problem arose. As long as you don't restart node-red then it won't start using it, I think.

Once it has updated nodejs don't forget to go into the .node-red folder and run  
`npm rebuild`  
then restart node-red.

---

<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:** [15 April 2022 22:05 UTC](https://discourse.nodered.org/t/nr-update-node-js-failed/58332/5 "2022-04-15T22:05:19Z")

</div>

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