# Is there a problem with the update script?

**URL:** <https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843>\
**Category:** General\
**Created:** [30 June 2021 16:05 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843 "2021-06-30T16:05:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mastiff](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mastiff](https://discourse.nodered.org/u/Mastiff)\
**Post date:** [30 June 2021 16:05 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/1 "2021-06-30T16:05:08Z")

</div>

I tried the regular script on one installation that has 1.1.3 and one that has 1.3.2, and both exited without any errors. The script:

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

```

The output:

> Running Node-RED install for user pi at /home/pi on raspbian  
> You can force an install of node 12 or 14 by using the --node12 or --node14 parameter  
> However doing so may break some nodes that may need re-installing manually.  
> Generally it is recommended to upgrade all nodes to their latest versions before upgrading.  
> Please backup your installation and flows before upgrading.  
> Exiting now.

Is that a problem centrally, or can it be that I have nodes that prevents the upgrade? The oldest node I have is Tellstick Duo, which is not updated anymore.

---

<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:** [30 June 2021 16:08 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/2 "2021-06-30T16:08:53Z")

</div>

which version of node.js do you currently have installed ?

---

<div class="post-metadata">

**Author:** ![Mastiff](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mastiff](https://discourse.nodered.org/u/Mastiff)\
**Post date:** [30 June 2021 16:22 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/3 "2021-06-30T16:22:05Z")

</div>

10.24.0 on both the oldest and the newest, for some reason.

---

<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:** [30 June 2021 17:28 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/4 "2021-06-30T17:28:00Z")

</div>

You can use the Manage Palette option in the menu to check for any nodes that can be updated.

---

<div class="post-metadata">

**Author:** ![Mastiff](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mastiff](https://discourse.nodered.org/u/Mastiff)\
**Post date:** [30 June 2021 18:01 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/5 "2021-06-30T18:01:31Z")

</div>

@Colin I am aware of that. But that doesn't let me update the actual program or node.js, which is what I'm trying to do. I just now tried to upgrade the nodes that were upgradeable (as I said the Tellstick node hasn't been updatet for years), but that didn't let me upgrade the core files, the script still has the same answer. And I have upgraded Pi's before that have the Tellstick node running without any issue.

---

<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:** [30 June 2021 18:21 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/6 "2021-06-30T18:21:40Z")

</div>

so yeah - the latest script doesn't force update nodejs to the supported version 12 and 14 - you need to update to node 12 or 14 - but we aren't going to force that in case you have something you rely on.

---

<div class="post-metadata">

**Author:** ![Mastiff](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mastiff](https://discourse.nodered.org/u/Mastiff)\
**Post date:** [30 June 2021 18:23 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/7 "2021-06-30T18:23:15Z")

</div>

Ah, you posted while I was writing that I had to use the force `--node12` to get it to run. I'll just have to see if it breaks something. As you say, this is something new, I have done this not so long ago on one of the same Pi's, and it didn't give me this. I didn't dare to do any force stuff befor I knew that it wasn't some kind of a bug. Thanks!

---

<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:** [30 June 2021 18:28 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/8 "2021-06-30T18:28:52Z")

</div>

I think the wording in the script could be improved, I don't think it is clear that the reason it is exiting is that nodejs needs to be updated.

---

<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:** [30 June 2021 18:30 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/9 "2021-06-30T18:30:08Z")

</div>

Yes. Not ideal I know. But there are a lot of devices out here including embedded type ones that are still running node 8 and 10. any that have binary code (probably like Tellstick) need recompiling and the potential for breaking them is too great for me to risk just trying to force them without the user actually being involved.

---

<div class="post-metadata">

**Author:** ![Mastiff](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mastiff](https://discourse.nodered.org/u/Mastiff)\
**Post date:** [30 June 2021 18:31 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/10 "2021-06-30T18:31:42Z")

</div>

It only said that I could force it to do 12 or 14, and not that this choice was necessary to move on with the upgrade, so I agree that it could have told me that, and "it's your own fault if you break something and don't have a backup" (which I of course have - I do an image backup on every major change.

Edit: Oh, and the Tellstick node did break on the upgrade, so I guess I'll have to go back to that image backup. It's not possible to upgrade Node-RED without the node? As I said I have one running 1.3.2 and one running 1.1.3, and I guess that should mean that it's at least possible to upgrade Node-RED to 1.3.2 on Node.js 10, right?

---

<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:** [30 June 2021 18:34 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/11 "2021-06-30T18:34:34Z")

</div>

Perhaps it could say:  
Node red now requires node version 12 or above, you can force an install of ...

---

<div class="post-metadata">

**Author:** ![Mastiff](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mastiff](https://discourse.nodered.org/u/Mastiff)\
**Post date:** [30 June 2021 18:45 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/12 "2021-06-30T18:45:09Z")

</div>

Btw I was able to downgrade node.js with these comands:

```auto
sudo npm install -g n
sudo n 10.24.0

```

And then I used the downgrade for Node-RED,

```auto
sudo npm install -g --unsafe-perm node-red@1.3.2

```

But that didn't fix my Tellstick, so I'll go back to the previous backup. What was the final version that supported node.js 10?

---

<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:** [30 June 2021 18:49 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/13 "2021-06-30T18:49:38Z")

</div>

> [@Mastiff](#):
>
> that should mean that it's at least possible to upgrade Node-RED to 1.3.2 on Node.js 10

You can upgrade just node red using  
`npm install -g --unsafe-perm node-red`

---

<div class="post-metadata">

**Author:** ![Mastiff](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mastiff](https://discourse.nodered.org/u/Mastiff)\
**Post date:** [30 June 2021 18:57 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/14 "2021-06-30T18:57:08Z")

</div>

Thanks, I'll try that and see if that works with the Tellstick node. Damned annoying that nobody has upgraded that in four years or so. There has been some questions at the Swedish Tellstick board, but nobody has managed to make it work in any other way than I found after trial and error. And that does not work with Node 12.

---

<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:** [30 June 2021 19:02 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/15 "2021-06-30T19:02:10Z")

</div>

I think if you specify the node-red version to be 1.3.5 then it will install that and leave the nodejs at 10.  
so --nodered-version="1.3.5" should work - as version 1 still supports node 10.

---

<div class="post-metadata">

**Author:** ![Mastiff](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mastiff](https://discourse.nodered.org/u/Mastiff)\
**Post date:** [30 June 2021 19:04 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/16 "2021-06-30T19:04:03Z")

</div>

I used Colin's syntax, and that worked. I now have 1.3.5 and Tellstick working, thanks! 😀

---

<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:** [30 June 2021 20:16 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/17 "2021-06-30T20:16:35Z")

</div>

Does the script now install version 2 by default? I thought that wasn't released yet.

---

<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:** [30 June 2021 20:29 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/18 "2021-06-30T20:29:11Z")

</div>

no - it installs latest by default - so currently 1.3.5. (though again you can specify --nodered-version="next" for 2.0-beta)  
And the logic is there in anticipation of 2.0 which is why it wants node12 or 14... but using the --nodered-version="1.3.5" skips that test.

---

<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:** [30 June 2021 20:37 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/19 "2021-06-30T20:37:57Z")

</div>

OK, understood.

---

<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:** [29 August 2021 20:38 UTC](https://discourse.nodered.org/t/is-there-a-problem-with-the-update-script/47843/20 "2021-08-29T20:38:23Z")

</div>

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