# No node.js update on Openmediavault 4.x

**URL:** <https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101>\
**Category:** General\
**Created:** [7 September 2023 10:11 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101 "2023-09-07T10:11:03Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [7 September 2023 10:11 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/1 "2023-09-07T10:11:03Z")

</div>

Openmediavault 4.1.36-1 (Arrakis) is based on Debian GNU/Linux 9.11 (stretch)

I have used the Pi script long time ago to install Node-RED 2.2 and now tried to install the new 3.1 version  
with parameter` --node16`.

But I get:

```auto
Remove old version of Node.js ✔ v12.22.12
Install Node.js 16 LTS ✔ v12.22.12 Npm 6.14.16

```

... and node -v still shows version 12.

According to

> <https://github.com/nodesource/distributions/blob/master/README.md>

... Node.js 16 is supported under Debian Stretch!?

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [7 September 2023 10:17 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/2 "2023-09-07T10:17:44Z")

</div>

The script states:

```auto
 If you wish to stay on nodejs 12 you can update to the latest Node-RED 1.x or 2.x version by adding
  --nodered-version="1.3.7" or --nodered-version="2.2.2" to that install command. If in doubt this is the safer option.

```

But `--nodered-version="2.2.2"` does not work!?

---

<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:** [7 September 2023 10:24 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/3 "2023-09-07T10:24:02Z")

</div>

First check that  
`sudo apt update`  
Followed by  
`sudo apt full-upgrade`  
Both work without error, then try the --node16 option again

First check all your nodes are on the latest versions

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [7 September 2023 10:56 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/4 "2023-09-07T10:56:19Z")

</div>

In the meantime I read the logs and came to the same conclusion. He did not find the repos.  
I had to edit the debian sources.list and rerun update & full-upgrade.

Now I'm getting this error with the script:

```auto
  Install Node.js 16 LTS ✘ Bad install: Node.js missing Npm missing - Exit cache

```

After reading the install.log I started the install process manually and get:

```auto
root@nas:~# sudo apt-get install nodejs
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Die folgenden NEUEN Pakete werden installiert:
  nodejs
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 27,2 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 128 MB Plattenplatz zusätzlich benutzt.
Holen:1 https://deb.nodesource.com/node_16.x stretch/main amd64 nodejs amd64 16.20.2-1nodesource1 [27,2 MB]
Fehl:1 https://deb.nodesource.com/node_16.x stretch/main amd64 nodejs amd64 16.20.2-1nodesource1
  Writing more data than expected (27212228 > 27210210)
  Hashes of expected file:
   - SHA256:80730cbf61c72b9cf55435cdf8bef44a865cd797bdf4b62b7e3a9151568a0a17
   - SHA1:f3ce40f55d97d4582eed117e4d26fdaa09d46a32 [weak]
   - MD5Sum:94cdd9c58e730374a1cf2c818e8ecedb [weak]
   - Filesize:27210210 [weak]
E: Fehlschlag beim Holen von https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.20.2-1nodesource1_amd64.deb Writing more data than expected (27212228 > 27210210)
   Hashes of expected file:
    - SHA256:80730cbf61c72b9cf55435cdf8bef44a865cd797bdf4b62b7e3a9151568a0a17
    - SHA1:f3ce40f55d97d4582eed117e4d26fdaa09d46a32 [weak]
    - MD5Sum:94cdd9c58e730374a1cf2c818e8ecedb [weak]
    - Filesize:27210210 [weak]

```

I also changed the default gateway, since I have two different routers here to exclude the possibility that the Firewall changes any files.

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [7 September 2023 11:19 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/5 "2023-09-07T11:19:47Z")

</div>

> [@stefan24](#):
>
> But `--nodered-version="2.2.2"` does not work!?

Any chance to install the latest 2.x version with this (documented) option of the PI script?

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [7 September 2023 11:39 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/6 "2023-09-07T11:39:54Z")

</div>

If I use the instructions on [GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions](https://github.com/nodesource/distributions) I could install Node.js 16 and afterwards run the PI script.  
If I omit the `--node16` parameter, the script installs Node-RED 3.1 with the existing Node.js 16.  
But if I use the `--node16` parameter, the script stops again.

---

<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:** [7 September 2023 15:55 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/7 "2023-09-07T15:55:26Z")

</div>

What is in the install log when it fails? /var/log/nodered-install.log

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [7 September 2023 19:27 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/8 "2023-09-07T19:27:25Z")

</div>

As far as I can see the same error like above:

```auto
Holen:1 https://deb.nodesource.com/node_16.x stretch/main amd64 nodejs amd64 16.20.2-1nodesource1 [27,2 MB]
Fehl:1 https://deb.nodesource.com/node_16.x stretch/main amd64 nodejs amd64 16.20.2-1nodesource1
  Writing more data than expected (27220422 > 27210210)
  Hashes of expected file:
   - SHA256:80730cbf61c72b9cf55435cdf8bef44a865cd797bdf4b62b7e3a9151568a0a17
   - SHA1:f3ce40f55d97d4582eed117e4d26fdaa09d46a32 [weak]
   - MD5Sum:94cdd9c58e730374a1cf2c818e8ecedb [weak]
   - Filesize:27210210 [weak]
E: Fehlschlag beim Holen von https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.20.2-1nodesource1_amd64.deb Writing more data than expected (27220422 > 27210210)
   Hashes of expected file:
    - SHA256:80730cbf61c72b9cf55435cdf8bef44a865cd797bdf4b62b7e3a9151568a0a17
    - SHA1:f3ce40f55d97d4582eed117e4d26fdaa09d46a32 [weak]
    - MD5Sum:94cdd9c58e730374a1cf2c818e8ecedb [weak]
    - Filesize:27210210 [weak]
E: Einige Archive konnten nicht heruntergeladen werden; vielleicht »apt-get update« ausführen oder mit »--fix-missing« probieren?

Versions: node:missing npm:missing
Already have nodejs v16.20.2
OLD nodejs 16 :
NEW nodejs :

```

But I also see this warning in the log:

```auto
                           SCRIPT DEPRECATION WARNING                    

  
  This script, located at https://deb.nodesource.com/setup_X, used to
  install Node.js is deprecated now and will eventually be made inactive.

  Please visit the NodeSource distributions Github and follow the
  instructions to migrate your repo.
  https://github.com/nodesource/distributions

  The NodeSource Node.js Linux distributions GitHub repository contains
  information about which versions of Node.js and which Linux distributions
  are supported and how to install it.
  https://github.com/nodesource/distributions

                          SCRIPT DEPRECATION WARNING

```

---

<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:** [7 September 2023 19:54 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/9 "2023-09-07T19:54:47Z")

</div>

Did you run the commands I suggested and make sure there are no errors?

```auto
sudo apt update
sudo apt full-upgrade

```

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [7 September 2023 19:57 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/10 "2023-09-07T19:57:42Z")

</div>

Yes, I did.

---

<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:** [7 September 2023 20:08 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/11 "2023-09-07T20:08:49Z")

</div>

I am running out of ideas here. What does  
`apt policy nodejs`  
show?

**[Edit]**  
Also  
`node -v`  
and  
`which node`  
please.

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [8 September 2023 08:48 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/12 "2023-09-08T08:48:13Z")

</div>

Like I said earlier:

> [@stefan24](#):
>
> If I use the instructions on [GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions](https://github.com/nodesource/distributions) I could install Node.js 16 and afterwards run the PI script.  
> If I omit the `--node16` parameter, the script installs Node-RED 3.1 with the existing Node.js 16.

So the issue is solved for me if I use this order.

But maybe the PI script from [nodered.org](http://nodered.org) is not perfect anymore, since the script from [nodesource.com](http://nodesource.com) claims the above warning: "SCRIPT DEPRECATION WARNING"

---

<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:** [8 September 2023 15:41 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/13 "2023-09-08T15:41:06Z")

</div>

Yes I know you have worked around it. The information asked for may help work out what is different with your system.

---

<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:** [22 September 2023 15:41 UTC](https://discourse.nodered.org/t/no-node-js-update-on-openmediavault-4-x/81101/14 "2023-09-22T15:41:21Z")

</div>

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