Node-red won't work after Ubuntu update

I have just updated to the Gorilla version of Ubuntu.

I went from Beaver to the F version and Node-Red worked.

Today I got the G version installed.

Alas some time there after that, I checked NR and it wasn't working.
I enabled it and started it.
Neither command complained.

I even checked the status. Running.

But it isn't/wasn't.

Just to be sure, I ran the script:

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

It started but then failed.

Log:

me@me-desktop:~/.node-red$ tail /var/log/nodered-install.log
(Reading database ... 311327 files and directories currently installed.)
Preparing to unpack .../nodejs_12.19.0-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (12.19.0-deb-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_12.19.0-deb-1nodesource1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/doc/nodejs/api/perf_hooks.html', which is also in package nodejs-doc 12.18.2~dfsg-1ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_12.19.0-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Versions: node: npm:
me@me-desktop:~/.node-red$ 

I also got this pop up on my screen:

Oh, why is it mentioning RasPies when it is running?

What does apt policy nodejs show?
It is possible that nodesource does not support 20.10 yet.

me@me-desktop:~/.node-red$ apt policy nodejs
nodejs:
  Installed: (none)
  Candidate: 12.19.0-deb-1nodesource1
  Version table:
     12.19.0-deb-1nodesource1 500
        500 https://deb.nodesource.com/node_12.x groovy/main amd64 Packages
     12.18.2~dfsg-1ubuntu2 500
        500 http://ftp.iinet.net.au/pub/ubuntu groovy/universe amd64 Packages
me@me-desktop:~/.node-red$ 

How about
sudo apt install nodejs

Edit: run sudo apt clean first.

Alas,

me@me-desktop:~$ sudo apt clean
[sudo] password for me: 
me@me-desktop:~$ sudo apt install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  lib32gcc-s1 lib32stdc++6 libc6-i386 libffi-dev libjsoncpp1 libncurses-dev libobjc-9-dev libobjc4 libomp-10-dev libomp-dev libomp5-10
  libstdc++-9-dev libtinfo-dev nodejs-doc
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  nodejs
0 to upgrade, 1 to newly install, 0 to remove and 2 not to upgrade.
Need to get 18.3 MB of archives.
After this operation, 94.0 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_12.x groovy/main amd64 nodejs amd64 12.19.0-deb-1nodesource1 [18.3 MB]
Fetched 18.3 MB in 5s (3,982 kB/s)                  
(Reading database ... 305462 files and directories currently installed.)
Preparing to unpack .../nodejs_12.19.0-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (12.19.0-deb-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_12.19.0-deb-1nodesource1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/doc/nodejs/api/perf_hooks.html', which is also in package nodejs-doc 12.18.2~dfsg-1ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_12.19.0-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
me@me-desktop:~$ 

Good news!

I did a sudo apt update and sudo apt upgrade. That lead to a sudo apt autoremove

Now nodejs is installed.

Trying the install script again.

(Why does it mention the RasPi? for this install when it is supposed to be .... Just asking.)

Ok, now it has gone to this:

I'm confused.

It is just warning you that if you run it on a pi then it may take a long time. Most using the script will be running it on a pi.
Are you using a terminal related node of some of sort?

Not as far as I know.

It worked ok on Ubuntu 20.04. When I went to 20.1 (just in the last few hours) this happened.
No nodes were added ITMT.

I tried to find the node:

But when I select it, it doesn't show me the node.

This too isn't helping:

And from the terminal in which I started NR:

- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
29 Oct 19:30:38 - [warn] [node-red-contrib-msg-queue/retry-queue] Error: Cannot find module '/home/me/.node-red/node_modules/node-persistent-queue/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node'
Require stack:
- /home/me/.node-red/node_modules/node-persistent-queue/node_modules/sqlite3/lib/sqlite3.js
- /home/me/.node-red/node_modules/node-persistent-queue/index.js
- /home/me/.node-red/node_modules/node-red-contrib-msg-queue/queue/retry-queue.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
29 Oct 19:30:38 - [warn] [node-red-contrib-xterm/xterm_config] Error: The module '/home/me/.node-red/node_modules/node-pty-prebuilt-multiarch/build/Release/pty.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
29 Oct 19:30:38 - [warn] [node-red-node-ui-etable/etable] Error: /home/me/.node-red/node_modules/node-red-node-ui-etable/etable.html does not exist
29 Oct 19:30:38 - [warn] ------------------------------------------------------
29 Oct 19:30:38 - [info] Settings file  : /home/me/.node-red/settings.js
29 Oct 19:30:38 - [info] HTTP Static    : /home/me/.node-red/public
29 Oct 19:30:38 - [info] Context store  : 'default' [module=memory]
29 Oct 19:30:38 - [info] User directory : /home/me/.node-red
29 Oct 19:30:38 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
29 Oct 19:30:38 - [info] Flows file     : /home/me/.node-red/flows_me-desktop.json
29 Oct 19:30:38 - [info] Server now running at http://127.0.0.1:1880/
29 Oct 19:30:38 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
29 Oct 19:30:38 - [info] Waiting for missing types to be registered:
29 Oct 19:30:38 - [info]  - xterm_config

Does that help?

Again: No new nodes installed since it was working happily on 18.04 LTS and for a short time 20.04

And a bit more stuff. Not sure if it is helpful/useful. But I think it could be better to show it so things are known.

29 Oct 20:09:01 - [info] 

Welcome to Node-RED
===================

29 Oct 20:09:01 - [info] Node-RED version: v1.2.2
29 Oct 20:09:01 - [info] Node.js  version: v12.19.0
29 Oct 20:09:01 - [info] Linux 5.8.0-26-generic x64 LE
29 Oct 20:09:01 - [info] Loading palette nodes
node-red-contrib-jktestEditableList - initialising module. Module Version: 0.1.1
node-red-contrib-jktestEditableList - loading module
29 Oct 20:09:03 - [info] +-----------------------------------------------------
29 Oct 20:09:03 - [info] | uibuilder initialised:
29 Oct 20:09:03 - [info] |   root folder: /home/me/.node-red/uibuilder
29 Oct 20:09:03 - [info] |   version . .: 2.0.1
29 Oct 20:09:03 - [info] |   packages . : vue,bootstrap,bootstrap-vue,socket.io,jquery
29 Oct 20:09:03 - [info] +-----------------------------------------------------
innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /home/me/.node-red/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js
- /home/me/.node-red/node_modules/node-pty-prebuilt-multiarch/lib/index.js
- /home/me/.node-red/node_modules/node-red-contrib-xterm/xterm_config.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/me/.node-red/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js:30:15)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/me/.node-red/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js',
    '/home/me/.node-red/node_modules/node-pty-prebuilt-multiarch/lib/index.js',
    '/home/me/.node-red/node_modules/node-red-contrib-xterm/xterm_config.js',
    '/usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js',
    '/usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js',
    '/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js',
    '/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js',
    '/usr/lib/node_modules/node-red/lib/red.js',
    '/usr/lib/node_modules/node-red/red.js'
  ]
}
29 Oct 20:09:03 - [info] Dashboard version 2.23.0 started at /ui
29 Oct 20:09:03 - [warn] ------------------------------------------------------
29 Oct 20:09:03 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/home/me/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node'
Require stack:
- /home/me/.node-red/node_modules/sqlite3/lib/sqlite3.js
- /home/me/.node-red/node_modules/node-red-node-sqlite/sqlite.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
29 Oct 20:09:03 - [warn] [node-red-contrib-msg-queue/queue] Error: Cannot find module '/home/me/.node-red/node_modules/node-persistent-queue/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node'
Require stack:
- /home/me/.node-red/node_modules/node-persistent-queue/node_modules/sqlite3/lib/sqlite3.js
- /home/me/.node-red/node_modules/node-persistent-queue/index.js
- /home/me/.node-red/node_modules/node-red-contrib-msg-queue/queue/ready-queue.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
29 Oct 20:09:03 - [warn] [node-red-contrib-msg-queue/retry-queue] Error: Cannot find module '/home/me/.node-red/node_modules/node-persistent-queue/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node'
Require stack:
- /home/me/.node-red/node_modules/node-persistent-queue/node_modules/sqlite3/lib/sqlite3.js
- /home/me/.node-red/node_modules/node-persistent-queue/index.js
- /home/me/.node-red/node_modules/node-red-contrib-msg-queue/queue/retry-queue.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
29 Oct 20:09:03 - [warn] [node-red-contrib-xterm/xterm_config] Error: The module '/home/me/.node-red/node_modules/node-pty-prebuilt-multiarch/build/Release/pty.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
29 Oct 20:09:03 - [warn] [node-red-node-ui-etable/etable] Error: /home/me/.node-red/node_modules/node-red-node-ui-etable/etable.html does not exist
29 Oct 20:09:03 - [warn] ------------------------------------------------------
29 Oct 20:09:03 - [info] Settings file  : /home/me/.node-red/settings.js
29 Oct 20:09:03 - [info] HTTP Static    : /home/me/.node-red/public
29 Oct 20:09:03 - [info] Context store  : 'default' [module=memory]
29 Oct 20:09:03 - [info] User directory : /home/me/.node-red
29 Oct 20:09:03 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
29 Oct 20:09:03 - [info] Flows file     : /home/me/.node-red/flows_me-desktop.json
29 Oct 20:09:03 - [error] Unable to listen on http://127.0.0.1:1880/
29 Oct 20:09:03 - [error] Error: port in use
me@me-desktop:~/.node-red$ 

I think this error tells you the issue - you've changed the version of node and need to rebuild the module in question.

In this instance, npm rebuild node-pty-prebuilt-multiarch

Would it not be a good idea to rebuild everything in this case, or can one be certain that, since no other errors are show, that everything else is ok?
@Trying_to_learn if you want to rebuild everything go to your .node-red directory and run
npm rebuild

Thank you Nick.

Yes it probably does point me to the answer, but what throws me is: where is this node?
I'm guessing it is hidden somewhere in the workings of NR. Fair enough I guess.

But if I have run the install script twice it begs the question: why didn't doing that fix/resolve that problem?

Ok, NR is more complex than I can imagine and not everything is perfect - me being a case in point.

But as much as I was being told who is the faulty node, when it is one of these invisible nodes it causes confusion about the validity of the report.
That isn't a slight against anything/one. But that is how I see/saw it.

"Fix a node which doesn't exist" isn't really something I would believe at face value.

Anyway, I am now doing it.

All good now.

Thanks.

It looks to me as if it is part of node-red-contrib-xterm that presumably you installed.

If the script installs or upgrades nodejs then it will rebuild the nodes, but you installed it manually (sudo apt install nodejs). The script checks the installed nodejs and if it seems ok then it leaves it and doesn't rebuild.

I shall have to agree.

Alas I need to scroll more and more through my nodes.

I think x_term is/was an addon I installed for some (now) unknown reason. I did finally find it way way way down at the bottom of my nodes.

Given that, why wasn't it found when I searched for it?
I guess I did something stupid - but that's a given.

Anyway, it is now working, thanks.
Appreciated.

You searched for xterm_config but the node name is node-red-contrib-xterm. The file name is xterm_config, I believe.

1 Like

Thanks.

I really need a new brain. this one really seems to be faulty.

The trouble with getting a new brain is that 'you' get chucked out with the old brain.

1 Like

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