# Weird issues trying to update

**URL:** <https://discourse.nodered.org/t/weird-issues-trying-to-update/50895>\
**Category:** General\
**Created:** [11 September 2021 17:28 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895 "2021-09-11T17:28:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 17:28 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/1 "2021-09-11T17:28:14Z")

</div>

Hi,

I have an Intel NUC that' has been running Debian 10 reliably for several years, I use it as a general purpose Linux IOT server. I used @scargill "The Script" to install all the IOT programs. I consider myself moderately handy with Linux but have exhausted my skillset on this one.

Recently I decided to upgrade to Node-RED 2.06 and that's where things went South on me, As usual I've backed up my system. Backed up flows to Github. Then ran the Running on Raspberry Pi, Installing and Upgrading Node-RED and received the error show below.

I tried my best to force install a later version of node out of frustration but that led to further frustration.  
With that I'm submitting this request for help and would appreciate whatever you can offer.

First some versions:

> pi@mynuc:~/.node-red $ uname -a  
> Linux mynuc 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86\_64 GNU/Linux  
> pi@mynuc:~/.node-red $ node -v  
> v10.24.0  
> pi@mynuc:~/.node-red $ npm -v  
> 5.8.0  
> pi@mynuc:~/.node-red $ nvm -v  
> 0.37.2  
> pi@mynuc:~/.node-red $

Upgrade command:

pi@mynuc:~/.node-red $ bash \<(curl -sL [https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)) --node16

Output from above command:

This can take 20-30 minutes on the slower Pi versions - please wait.

Stop Node-RED ✔  
Remove old version of Node-RED ✔  
Remove old version of Node.js ✔ v10.24.0  
Install Node.js 16 LTS ✘ Bad install: Node.js v10.24.0 Npm missing - Exit  
Clean npm cache  
Install Node-RED core  
Move global nodes to local  
Npm rebuild existing nodes  
Install extra Pi nodes  
Add shortcut commands  
Update systemd script

Any errors will be logged to /var/log/nodered-install.log

[nodered-install.log](https://discourse.nodered.org/uploads/short-url/mG6XYwv09HEw7002ik8LUYry5Ru.log) (22.9 KB)

pi@mynuc:~/.node-red $

---

<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:** [11 September 2021 19:07 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/2 "2021-09-11T19:07:45Z")

</div>

what does  
`apt policy nodejs`  
show?

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 19:18 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/3 "2021-09-11T19:18:56Z")

</div>

Hi Colin,

Here's the output of that command:

```auto
pi@mynuc:~/.node-red $ sudo apt policy nodejs
nodejs:
  Installed: 10.24.0~dfsg-1~deb10u1
  Candidate: 10.24.0~dfsg-1~deb10u1
  Version table:
 *** 10.24.0~dfsg-1~deb10u1 500
        500 http://ftp.debian.org/debian buster/main i386 Packages
        500 http://security.debian.org buster/updates/main i386 Packages
        100 /var/lib/dpkg/status
pi@mynuc:~/.node-red $ 

```

I tried following the instructions at this site to install a specific version of node,js but could just not get it to work.

[How to Install Node.js on Debian 10/9/8](https://tecadmin.net/install-latest-nodejs-npm-on-debian/)

---

<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:** [11 September 2021 19:31 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/4 "2021-09-11T19:31:55Z")

</div>

Is there a file `/etc/apt/sources.list.d/nodesource.list` and if so what is in it?

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 19:38 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/5 "2021-09-11T19:38:37Z")

</div>

Colin,

Yes that file is present.

```auto
pi@mynuc:/etc/apt/sources.list.d $ cat nodesource.list
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x buster main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x buster main
pi@mynuc:/etc/apt/sources.list.d $

```

Admin edit. Triple backticks added around the text so that the forum does not mess with it.

---

<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:** [11 September 2021 19:40 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/6 "2021-09-11T19:40:28Z")

</div>

That looks ok, but it is not finding nodejs 16 (as is shown by the apt policy command). I wonder whether nodesource does not have a Debian build of 16. Try it with 14 instead.

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 19:45 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/7 "2021-09-11T19:45:36Z")

</div>

Colin,

Exact same results with --node14

Running Node-RED update for user pi at /home/pi on debian

This can take 20-30 minutes on the slower Pi versions - please wait.

Stop Node-RED ✔  
Remove old version of Node-RED ✔  
Remove old version of Node.js ✔ v10.24.0  
Install Node.js 14 LTS ✘ Bad install: Node.js v10.24.0 Npm missing - Exit  
Clean npm cache  
Install Node-RED core  
Move global nodes to local  
Npm rebuild existing nodes  
Install extra Pi nodes  
Add shortcut commands  
Update systemd script

Any errors will be logged to /var/log/nodered-install.log

pi@mynuc:~/.node-red $

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 19:47 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/8 "2021-09-11T19:47:24Z")

</div>

Colin,

Anticipating a request to try --node12, I tried and same results.

---

<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:** [11 September 2021 19:50 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/9 "2021-09-11T19:50:19Z")

</div>

> [@boskoe](#):
>
> ```auto
> pi@mynuc:~/.node-red $ sudo apt policy nodejs
> nodejs:
> Installed: 10.24.0~dfsg-1~deb10u1
> Candidate: 10.24.0~dfsg-1~deb10u1
> Version table:
> *** 10.24.0~dfsg-1~deb10u1 500
> 500 http://ftp.debian.org/debian buster/main i386 Packages
> 500 http://security.debian.org buster/updates/main i386 Packages
> 100 /var/lib/dpkg/status
> 
> ```

I see it has i386 there. Is that a 32 bit processor? If so then that is the problem I think. I don't know how to install nodejs on a 32 bit intel processor. I believe nodesource does not have them.

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 19:52 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/10 "2021-09-11T19:52:45Z")

</div>

Colin,

I'm almost positive it's 64bit. Isn't that what this means?

pi@mynuc:~/.node-red $ uname -a  
Linux mynuc 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86\_64 GNU/Linux

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 19:58 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/11 "2021-09-11T19:58:52Z")

</div>

I said it was weird! LOL

pi@mynuc:~/.node-red $ node

> arch  
> Thrown:  
> ReferenceError: arch is not defined  
> process  
> process {  
> title: 'node',  
> version: 'v10.24.0',  
> versions:  
> { http\_parser: '2.9.4',  
> node: '10.24.0',  
> v8: '6.8.275.32-node.59',  
> uv: '1.24.1',  
> zlib: '1.2.11',  
> brotli: '1.0.7',  
> ares: '1.14.0',  
> modules: '64',  
> nghttp2: '1.41.0',  
> napi: '7',  
> openssl: '1.1.1d',  
> icu: '63.1',  
> unicode: '11.0',  
> cldr: '34.0',  
> tz: '2018e' },  
> arch: 'ia32',  
> platform: 'linux',  
> release:  
> { name: 'node',  
> lts: 'Dubnium',  
> sourceUrl:  
> '[https://nodejs.org/download/release/v10](https://nodejs.org/download/release/v10).

---

<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:** [11 September 2021 20:04 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/12 "2021-09-11T20:04:36Z")

</div>

i386 definitely suggests 32 bit so I think something is messed up in your sources. What is in `/etc/apt/sources.list`? When pasting it in use the `</>` button at the top of the forum entry window, or surround it with triple backticks, to stop the forum messing with it.

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 20:09 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/13 "2021-09-11T20:09:20Z")

</div>

Colin,

Here is contents of that directory.

```auto
pi@mynuc:/etc/apt/sources.list.d $ ls -l
total 60
-rw-r--r-- 1 root root 72 Nov 4 2019 docker.list
-rw-r--r-- 1 root root 72 Nov 4 2019 docker.list.save
-rw-r--r-- 1 root root 189 Nov 4 2019 google-chrome.list.save
-rw-r--r-- 1 root root 53 Nov 4 2019 grafana.list
-rw-r--r-- 1 root root 53 Nov 4 2019 grafana.list.save
-rw-r--r-- 1 root root 54 Nov 4 2019 influxdb.list
-rw-r--r-- 1 root root 54 Nov 4 2019 influxdb.list.save
-rw-r--r-- 1 root root 192 Jun 7 07:22 microsoft-edge-dev.list
-rw-r--r-- 1 root root 204 Sep 11 15:46 nodesource.list
-rw-r--r-- 1 root root 254 May 12 12:48 ookla_speedtest-cli.list
-rw-r--r-- 1 root root 188 Nov 4 2019 raspi.list
-rw-r--r-- 1 root root 187 Nov 4 2019 raspi.list.save
-rw-r--r-- 1 root root 41 Mar 17 07:30 vscode.list
-rw-r--r-- 1 root root 65 Nov 4 2019 webmin.list
-rw-r--r-- 1 root root 65 Nov 4 2019 webmin.list.save
pi@mynuc:/etc/apt/sources.list.d $ 

```

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 20:44 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/14 "2021-09-11T20:44:30Z")

</div>

Colin,

I just updated the nodesource to 16.x.  
Then with "nvm install node" I managed to get Node v16.9.1 x64 installed.  
Then installed Node-RED with:

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

```

Node-RED runs and my flows are running. I've noticed some of the nodes in the palette have yellow exclamation marks with errors like "module\_not\_found" , "type\_already\_registered"

If I start Node-Red with systemctl I get Flows stopped due to missing node types. If I start with "node-red" everything runs okay other than the node errors mentioned.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 September 2021 22:53 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/15 "2021-09-11T22:53:15Z")

</div>

It is generally recommended not to use n or nvm with node-red. Been mentioned many times as the cause of installation issues.

Search **nvm** on this forum. Lots of install related issues.

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [11 September 2021 23:07 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/16 "2021-09-11T23:07:55Z")

</div>

Hi Steve,

Believe me I would have liked to have used the supplied install methods but as I mentioned above I'm having problems.

---

<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:** [12 September 2021 10:41 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/17 "2021-09-12T10:41:28Z")

</div>

So the weirdness here is that uname is reporting `Linux mynuc 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux` which makes it look like it is x86\_64 - 64bit capable and yet it seems to be 32 bit (which should report i686) - so either this is a weird processor... or somehow a 32 bit OS has been installed on it in the first place. Either way it is enough to confuse the install script with then tries to install the 64bit node.js and fails... leaving the "old" nodev10 in place which isn't enough to run Node-RED v2.

I don't think there is a way to migrate from 32 to 64 bit OS - so you can either do what you have done using n or nvm (but may confuse things when trying to run as a service etc) as they typically only run for the current user and not when running as a service... or uninstall nodejs10 and manually install nodejs14 for x86 from the unofficial build site ( [Index of /download/release/v14.17.6/](https://unofficial-builds.nodejs.org/download/release/v14.17.6/) ) as node.js stopped building for 32 bit officially a while back.

---

<div class="post-metadata">

**Author:** ![boskoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boskoe/32/13208_2.png) [@boskoe](https://discourse.nodered.org/u/boskoe)\
**Post date:** [12 September 2021 15:55 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/18 "2021-09-12T15:55:20Z")

</div>

dceejay,

Thanks for the insight. I agree with you there is something fundamentally wrong with this setup.  
It's aged enough that it's time I start a plan on replacing it. This just might be the kick in the shorts that starts that process.

One more bit of weirdness is that once I "nvm" installed node 16 I then took a chance and ran the node-RED install script and it did it's thing without errors. I did have to do some cleaning up of individual nodes that had problems from all these attempts at upgrading.

I want to thank Colin, Steve-Mcl and you for helping with your time and knowledge.

Doug

---

<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:** [12 September 2021 16:49 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/19 "2021-09-12T16:49:28Z")

</div>

> [@boskoe](#):
>
> once I "nvm" installed node 16 I then took a chance and ran the node-RED install script and it did it's thing without errors

That is because the script saw that 16 was installed so did not try to update it.

---

<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:** [11 November 2021 16:50 UTC](https://discourse.nodered.org/t/weird-issues-trying-to-update/50895/20 "2021-11-11T16:50:02Z")

</div>

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