Update long-term live Node-RED in readiness for testing the new Matter node

No, 20 is not supported yet.

Colin queried your comment. So 18 it is - is it npm rebuild or npm update? I'll make a start when I hear back - Ta.

the minimum - in your user dir - usually ~/.node-red
npm rebuild

if you want check state of extra nodes then
npm outdated

then
npm update
will update any that are shown in red
any shown in yellow will need to be manually updated by eg
npm i node-red-contrib-foo@latest
ie request the @latest version

But as I said at start you should only need the npm rebuild to start with.

1 Like

Is it not the case that if the upgrade script is used to upgrade nodejs, that the script will run the rebuild?

I think the best thing is to upgrade all the nodes (using manage palette) before running the upgrade, also run
sudo apt update
sudo apt full-upgrade
to make sure the pi OS is up to date.

That could be quite an onerous task if running lots of contrib nodes

Do you mean it is easier to do as Dave suggested?

It certainly looks a quicker way

Did all that, plumping for nodejs18 and this is the result after a erboot then node-red-start...

Starting as a systemd service.
Error loading settings file: /home/pi/.node-red/settings.js
Error: Could not locate the bindings file. Tried:
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/build/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/build/Debug/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/out/Debug/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/Debug/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/out/Release/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/Release/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/build/default/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/compiled/18.17.1/linux/arm/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/addon-build/release/install-root/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/addon-build/debug/install-root/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/addon-build/default/install-root/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/lib/binding/node-v108-linux-arm/i2c.node
    at bindings (/home/pi/.node-red/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/i2c-bus/i2c-bus.js:4:32)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/settings.js:20:11)
    at Module._compile (node:internal/modules/cjs/loader:1256:14) {
  tries: [
    '/home/pi/.node-red/node_modules/i2c-bus/build/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/out/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/out/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/default/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/compiled/18.17.1/linux/arm/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/release/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/debug/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/default/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/lib/binding/node-v108-linux-arm/i2c.node'
  ]
}
nodered.service: Succeeded.

Not sure what actually "succeeded" but as you can see it had trouble with settings.js and could not find the "bindings file". and at :1880 Node-Red is not coming up in the browser as running...

I've left that on an SSD on a spare Pi as suggested... All of this seemed to be sailing along following DJs instructions until the second update including the nodejs18 option.. At default nodejs14 all seems to be fine with Node-Red and it's running right now - of course dfeating the object as that won't run the matter node.

So just for clarification here I'm using RPi4 boards with 2GB RAM.

Can you post your settings.js?

Sure - this is the settings.js (in /home/pi/.node-red) from the working installation upgraded to NR 3 but nodejs14.

You need the one from the nodejs18 further "upgrade" where NTR won't start?

/**
 * Copyright JS Foundation and other contributors, http://js.foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **/

// The `https` setting requires the `fs` module. Uncomment the following
// to make it available:
var fs = require("fs");
var i2c = require("i2c-bus");

 var mySettings;
 try {
 mySettings = require("/home/pi/.node-red/redvars.js");
 } catch(err) {
 mySettings = {};
 }

module.exports = {
    // the tcp port that the Node-RED web server is listening on
    uiPort: process.env.PORT || 1880,

    // By default, the Node-RED UI accepts connections on all IPv4 interfaces.
    // To listen on all IPv6 addresses, set uiHost to "::",
    // The following property can be used to listen on a specific interface. For
    // example, the following would only allow connections from the local machine.
    //uiHost: "127.0.0.1",

    // Retry time in milliseconds for MQTT connections
    mqttReconnectTime: 15000,

    // Retry time in milliseconds for Serial port connections
    serialReconnectTime: 15000,

    // Retry time in milliseconds for TCP socket connections
    //socketReconnectTime: 10000,

    // Timeout in milliseconds for TCP server socket connections
    //  defaults to no timeout
    //socketTimeout: 120000,

    // Timeout in milliseconds for HTTP request connections
    //  defaults to 120 seconds
    //httpRequestTimeout: 120000,

    // The maximum length, in characters, of any message sent to the debug sidebar tab
    debugMaxLength: 1000,

    // The maximum number of messages nodes will buffer internally as part of their
    // operation. This applies across a range of nodes that operate on message sequences.
    //  defaults to no limit. A value of 0 also means no limit is applied.
    //nodeMaxMessageBufferLength: 0,

    // To disable the option for using local files for storing keys and certificates in the TLS configuration
    //  node, set this to true
    //tlsConfigDisableLocalFiles: true,

    // Colourise the console output of the debug node
    //debugUseColors: true,

    // The file containing the flows. If not set, it defaults to flows_<hostname>.json
    flowFile: 'flows.json',

    // To enabled pretty-printing of the flow within the flow file, set the following
    //  property to true:
    flowFilePretty: true,

    // By default, credentials are encrypted in storage using a generated key. To
    // specify your own secret, set the following property.
    // If you want to disable encryption of credentials, set this property to false.
    // Note: once you set this property, do not change it - doing so will prevent
    // node-red from being able to decrypt your existing credentials and they will be
    // lost.
    
	credentialSecret: false,

    // By default, all user data is stored in the Node-RED install directory. To
    // use a different location, the following property can be used
    //userDir: '/home/nol/.node-red/',

    // Node-RED scans the `nodes` directory in the install directory to find nodes.
    // The following property can be used to specify an additional directory to scan.
    //nodesDir: '/home/nol/.node-red/nodes',

    // By default, the Node-RED UI is available at http://localhost:1880/
    // The following property can be used to specify a different root path.
    // If set to false, this is disabled.
    //httpAdminRoot: '/admin',

    // Some nodes, such as HTTP In, can be used to listen for incoming http requests.
    // By default, these are served relative to '/'. The following property
    // can be used to specifiy a different root path. If set to false, this is
    // disabled.
    //httpNodeRoot: '/red-nodes',

    // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
    // to apply the same root to both parts.
    //httpRoot: '/red',

    // When httpAdminRoot is used to move the UI to a different root path, the
    // following property can be used to identify a directory of static content
    // that should be served at http://localhost:1880/.
    //httpStatic: '/home/nol/node-red-static/',

    // The maximum size of HTTP request that will be accepted by the runtime api.
    // Default: 5mb
    //apiMaxLength: '5mb',

    // If you installed the optional node-red-dashboard you can set it's path
    // relative to httpRoot
    //ui: { path: "ui" },

    // Securing Node-RED
    // -----------------
    // To password protect the Node-RED editor and admin API, the following
    // property can be used. See http://nodered.org/docs/security.html for details.
    //adminAuth: {
    //    type: "credentials",
    //    users: [{
    //        username: "admin",
    //        password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",
    //        permissions: "*"
    //    }]
    //},

    // To password protect the node-defined HTTP endpoints (httpNodeRoot), or
    // the static content (httpStatic), the following properties can be used.
    // The pass field is a bcrypt hash of the password.
    // See http://nodered.org/docs/security.html#generating-the-password-hash
    //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
    //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},

    // The following property can be used to enable HTTPS
    // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
    // for details on its contents.
    // See the comment at the top of this file on how to load the `fs` module used by
    // this setting.
    //
    //https: {
    //    key: fs.readFileSync('privatekey.pem'),
    //    cert: fs.readFileSync('certificate.pem')
    //},

    // The following property can be used to cause insecure HTTP connections to
    // be redirected to HTTPS.
    //requireHttps: true

    // The following property can be used to disable the editor. The admin API
    // is not affected by this option. To disable both the editor and the admin
    // API, use either the httpRoot or httpAdminRoot properties
    //disableEditor: false,

    // The following property can be used to configure cross-origin resource sharing
    // in the HTTP nodes.
    // See https://github.com/troygoode/node-cors#configuration-options for
    // details on its contents. The following is a basic permissive set of options:
    //httpNodeCors: {
    //    origin: "*",
    //    methods: "GET,PUT,POST,DELETE"
    //},

    // If you need to set an http proxy please set an environment variable
    // called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
    // For example - http_proxy=http://myproxy.com:8080
    // (Setting it here will have no effect)
    // You may also specify no_proxy (or NO_PROXY) to supply a comma separated
    // list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk

    // The following property can be used to add a custom middleware function
    // in front of all http in nodes. This allows custom authentication to be
    // applied to all http in nodes, or any other sort of common request processing.
    //httpNodeMiddleware: function(req,res,next) {
    //    // Handle/reject the request, or pass it on to the http in node by calling next();
    //    // Optionally skip our rawBodyParser by setting this to true;
    //    //req.skipRawBodyParser = true;
    //    next();
    //},

    // The following property can be used to verify websocket connection attempts.
    // This allows, for example, the HTTP request headers to be checked to ensure
    // they include valid authentication information.
    //webSocketNodeVerifyClient: function(info) {
    //    // 'info' has three properties:
    //    //   - origin : the value in the Origin header
    //    //   - req : the HTTP request
    //    //   - secure : true if req.connection.authorized or req.connection.encrypted is set
    //    //
    //    // The function should return true if the connection should be accepted, false otherwise.
    //    //
    //    // Alternatively, if this function is defined to accept a second argument, callback,
    //    // it can be used to verify the client asynchronously.
    //    // The callback takes three arguments:
    //    //   - result : boolean, whether to accept the connection or not
    //    //   - code : if result is false, the HTTP error status to return
    //    //   - reason: if result is false, the HTTP reason string to return
    //},

    // Anything in this hash is globally available to all functions.
    // It is accessed as context.global.
    // eg:
    //    // functionGlobalContext: { os:require('os') }
    // can be accessed in a function block as:
    //    context.global.os

    // functionGlobalContext: {
        // os:require('os'),
        // jfive:require("johnny-five"),
        // j5board:require("johnny-five").Board({repl:false})
    // },

    // The following property can be used to order the categories in the editor
    // palette. If a node's category is not in the list, the category will get
    // added to the end of the palette.
    // If not set, the following default order is used:
    //paletteCategories: ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced'],

    // Configure the logging output
    logging: {
        // Only console logging is currently supported
        console: {
            // Level of logging to be recorded. Options are:
            // fatal - only those errors which make the application unusable should be recorded
            // error - record errors which are deemed fatal for a particular request + fatal errors
            // warn - record problems which are non fatal + errors + fatal errors
            // info - record information about the general running of the application + warn + error + fatal errors
            // debug - record information which is more verbose than info + info + warn + error + fatal errors
            // trace - record very detailed logging + debug + info + warn + error + fatal errors
            // off - turn off all logging (doesn't affect metrics or audit)
            level: "info",
            // Whether or not to include metric events in the log output
            metrics: false,
            // Whether or not to include audit events in the log output
            audit: false
        }
    }
,
 
     contextStorage: {
    	default    : { module: "localfilesystem"}
    },
    
    
    httpStatic: '/home/pi/.node-red/public',
    functionGlobalContext: {
		dateFormat:require('dateformat'),
        os:require('os'),
        moment:require('moment'), 
        fs:require('fs'), 
        i2c:require('i2c-bus'), 
        mySettings:mySettings 
    },
 
 
    adminAuth: {
        type: "credentials",
        users: [{
            username: "admin",
            password: "$2a$08$inogsZ/vlrK6bFuhrI6KjOWmNlFiDDX5VlRA4AUWOhnty/fakpW2G",
            permissions: "*"
        }]
    },
 
//    httpNodeAuth: {user:"user", pass:"$2a$08$QUcnR199toq/9eJMs4ZjeeAzeQ/N2AnyKCKN03pZWUEp62I6d1hDK"},


editorTheme: {
          theme: "midnight-red",
          codeEditor: {
            lib: "monaco",
            options: {
               theme: "vs-dark"
             }
         },
       }
}

I did, but I see the line

and that is what the error messages are about, so that is likely the cause of the problem. If, in the failing system, you go into your .node-red folder and run
npm list i2c-bus
what do you see?

Also show us what package.json says about i2c-bus.

Ok, the failing machine...

pi@mainpi:~:14:55[0]> cd .node-red
pi@mainpi:.node-red:14:55[0]> npm list i2c-bus
node-red-project@0.0.1 /home/pi/.node-red
โ””โ”€โ”€ i2c-bus@5.2.1

and here's the package.json in the same .node-red folder - around line 12 - that help?

{
  "name": "node-red-project",
  "description": "A Node-RED Project",
  "version": "0.0.1",
  "dependencies": {
    "@datdp88/node-red-contrib-datdp-data-review": "0.0.4",
    "@node-red-contrib-themes/midnight-red": "^1.5.1",
    "@node-red-contrib-themes/theme-collection": "^2.0.1",
    "@studiobox/node-red-contrib-ui-widget-thermometer": "~0.7.6",
    "bcryptjs": "^2.4.3",
    "dateformat": "^4.5.1",
    "i2c-bus": "^5.2.1",
    "moment": "^2.29.1",
    "node-red-contrib-advanced-ping": "^1.2.0",
    "node-red-contrib-alexa-local": "^0.3.24",
    "node-red-contrib-alexa-notifyme": "~1.0.4",
    "node-red-contrib-alexa-remote2-applestrudel": "~5.0.34",
    "node-red-contrib-amazon-echo": "~0.1.10",
    "node-red-contrib-bigtimer": "~2.8.5",
    "node-red-contrib-boolean-logic": "0.0.3",
    "node-red-contrib-buffer-parser": "^3.2.2",
    "node-red-contrib-color-convert": "0.0.8",
    "node-red-contrib-config": "~1.2.1",
    "node-red-contrib-diode": "~1.0.2",
    "node-red-contrib-dsm": "~0.14.1",
    "node-red-contrib-esplogin": "^1.3.7",
    "node-red-contrib-ewelink": "~2.0.0",
    "node-red-contrib-ewelink-cube": "~1.0.0",
    "node-red-contrib-file-function": "^1.1.2",
    "node-red-contrib-fs-ops": "~1.6.0",
    "node-red-contrib-ftp": "0.0.8",
    "node-red-contrib-googlehome": "0.0.15",
    "node-red-contrib-grove": "^1.0.9",
    "node-red-contrib-heater-controller": "~3.0.2",
    "node-red-contrib-ibm-watson-iot": "^0.2.8",
    "node-red-contrib-influxdb": "~0.6.1",
    "node-red-contrib-isonline": "^1.1.15",
    "node-red-contrib-localstorage": "~1.0.1",
    "node-red-contrib-loop": "~1.0.1",
    "node-red-contrib-moment": "~5.0.0",
    "node-red-contrib-nora": "0.0.34",
    "node-red-contrib-npm": "~1.0.2",
    "node-red-contrib-owntracks": "0.0.2",
    "node-red-contrib-particle": "~1.2.0",
    "node-red-contrib-play-audio": "^2.5.0",
    "node-red-contrib-power-monitor": "~1.2.1",
    "node-red-contrib-presence-faker": "~1.8.6",
    "node-red-contrib-ramp-thermostat": "~0.8.3",
    "node-red-contrib-shelly": "~10.13.6",
    "node-red-contrib-tasmota": "~0.9.12",
    "node-red-contrib-telegrambot": "~15.1.6",
    "node-red-contrib-theme-midnight-red": "^1.0.0-beta.10",
    "node-red-contrib-timeout": "~1.1.5",
    "node-red-contrib-tuya-smart-device": "~5.0.1",
    "node-red-contrib-ui-iro-color-picker": "~0.1.6",
    "node-red-contrib-ui-led": "~0.4.11",
    "node-red-contrib-ui-level": "~0.1.46",
    "node-red-contrib-ui-time-scheduler": "~1.17.2",
    "node-red-contrib-virtual-smart-home": "~3.0.9",
    "node-red-contrib-web-worldmap": "~2.33.0",
    "node-red-contrib-wled2": "~2.4.4",
    "node-red-contrib-yeelight": "~1.0.7",
    "node-red-contrib-zigbee2mqtt": "~2.7.1",
    "node-red-dashboard": "~3.5.0",
    "node-red-node-arduino": "~0.3.1",
    "node-red-node-darksky": "~0.1.19",
    "node-red-node-email": "~2.0.1",
    "node-red-node-emoncms": "~0.3.0",
    "node-red-node-geofence": "~0.3.4",
    "node-red-node-google": "~0.2.2",
    "node-red-node-openweathermap": "~0.5.1",
    "node-red-node-pi-gpio": "^2.0.6",
    "node-red-node-ping": "^0.3.3",
    "node-red-node-random": "^0.4.1",
    "node-red-node-rbe": "^0.5.0",
    "node-red-node-sentiment": "~0.1.6",
    "node-red-node-serialport": "^1.0.4",
    "node-red-node-smooth": "^0.1.2",
    "node-red-node-sqlite": "~1.0.3",
    "node-red-node-tail": "~0.4.0",
    "node-red-node-twitter": "~1.2.0",
    "node-red-node-ui-lineargauge": "~0.3.7"
  }
}

And just to be sure in the light of day - same failed mc, knowing NR not running I typed "node-red and here's the output - checked on PC Chrome - nothing happening at :1880

I do hope your brain is ticking as mine isn't producing anything useful...

pi@mainpi:.node-red:15:01[130]> node-red
Error loading settings file: /home/pi/.node-red/settings.js
Error: Could not locate the bindings file. Tried:
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/build/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/build/Debug/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/out/Debug/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/Debug/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/out/Release/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/Release/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/build/default/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/compiled/18.17.1/linux/arm/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/addon-build/release/install-root/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/addon-build/debug/install-root/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/addon-build/default/install-root/i2c.node
 โ†’ /home/pi/.node-red/node_modules/i2c-bus/lib/binding/node-v108-linux-arm/i2c.node
    at bindings (/home/pi/.node-red/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/i2c-bus/i2c-bus.js:4:32)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/settings.js:20:11)
    at Module._compile (node:internal/modules/cjs/loader:1256:14) {
  tries: [
    '/home/pi/.node-red/node_modules/i2c-bus/build/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/out/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/Debug/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/out/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/Release/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/build/default/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/compiled/18.17.1/linux/arm/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/release/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/debug/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/addon-build/default/install-root/i2c.node',
    '/home/pi/.node-red/node_modules/i2c-bus/lib/binding/node-v108-linux-arm/i2c.node'
  ]
}

I see there has recently been an update to 5.2.3, I don't know why you haven't got the latest version. Can you go into your .node-red folder and run
npm install i2c-bus@latest
which should give you 5.2.3. Then try restarting .node-red again. I have not got a great deal of hope though.

Cut a long story short as Discord is limiting me.

I upgraded i2c as suggested - after some faff....

NR is running. Some of the Sonoff stuff will be down to those units not being switched on... but I'm sure the SERIAL issue is BRAND NEW.... I'm cloning this so I can put it in my original PI which DEFINITELY has I2c and serial set up - SO.... (half-an-hour later - clean-clone then mount in original RPi - normally takes a few minutes with a recently used sd)... see next post

SO - Started up the original working Pi now with the new nodejs18-enabled clone... NR started - so did node-red-stop then node-red to get come console output..

Still the new serial port issue (no idea what to do - not seen serial port issues for what a year or 2?)- i2c seems to have gone away....

again ignore ewelink and vsh connection lines....

pi@mainpi:~:16:08[0]> node-red
31 Aug 16:08:54 - [info]

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

31 Aug 16:08:54 - [info] Node-RED version: v3.0.2
31 Aug 16:08:54 - [info] Node.js  version: v18.17.1
31 Aug 16:08:54 - [info] Linux 5.10.103-v7l+ arm LE
31 Aug 16:08:55 - [info] Loading palette nodes
31 Aug 16:09:01 - [info] Worldmap version 2.33.0
31 Aug 16:09:02 - [info] Dashboard version 3.5.0 started at /ui
It looks like serialport didn't install properly.
More information can be found here https://serialport.io/docs/guide-installation
The result of requiring the package is: undefined
Error: Could not locate the bindings file. Tried:
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/out/Debug/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/Debug/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/out/Release/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/Release/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/default/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/compiled/18.17.1/linux/arm/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/lib/binding/node-v108-linux-arm/bindings.node
    at bindings (/home/pi/.node-red/node_modules/@serialport/bindings/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/@serialport/bindings/lib/linux.js:2:36)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/@serialport/bindings/lib/index.js:14:22)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/serialport/lib/index.js:2:17)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/firmata/lib/com.js:44:18)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/firmata/lib/firmata.js:3:40)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at module.exports (/home/pi/.node-red/node_modules/node-red-node-arduino/35-arduino.js:5:17)
    at loadNodeSet (/usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js:366:27)
    at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js:460:31
    at Array.forEach (<anonymous>) {
  tries: [
    '/home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/out/Debug/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/Debug/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/out/Release/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/Release/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/build/default/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/compiled/18.17.1/linux/arm/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/lib/binding/node-v108-linux-arm/bindings.node'
  ]
}
31 Aug 16:09:03 - [warn] ------------------------------------------------------
31 Aug 16:09:03 - [warn] [node-red-node-arduino/arduino] Missing serialport dependency
31 Aug 16:09:03 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red
31 Aug 16:09:03 - [warn] ------------------------------------------------------
31 Aug 16:09:03 - [info] Settings file  : /home/pi/.node-red/settings.js
31 Aug 16:09:03 - [info] HTTP Static    : /home/pi/.node-red/public > /
31 Aug 16:09:03 - [info] Context store  : 'default' [module=localfilesystem]
31 Aug 16:09:03 - [info] User directory : /home/pi/.node-red
31 Aug 16:09:03 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
31 Aug 16:09:03 - [info] Flows file     : /home/pi/.node-red/flows.json
31 Aug 16:09:03 - [info] Server now running at http://127.0.0.1:1880/
31 Aug 16:09:03 - [warn] Using unencrypted credentials
31 Aug 16:09:04 - [info] Starting flows
31 Aug 16:09:04 - [info] [alexa-remote-account:Peter Scargill] intialising "Peter Scargill" with the PROXY method and NO saved data...
๐Ÿš€ ~ file: baseClass.ts:320 ~ baseClass ~ initSSE ~ url http://192.168.1.147:8081/open-api/v1/sse/bridge?access_token=41b2bef2-3926-46e7-9aa5-c1ae51987e67
31 Aug 16:09:05 - [info] Started flows
31 Aug 16:09:06 - [warn] [alexa-remote-account:Peter Scargill] open 192.168.1.19:3456 in your browser
Shelly gen1 server is listening on port 10000
31 Aug 16:09:06 - [info] [sqlitedb:6e9a0125.59bc4] opened /home/pi/dbs/iot.db ok
31 Aug 16:09:06 - [info] [sqlitedb:fdbe27fe.fb7848] opened /home/pi/dbs/iot.db ok
31 Aug 16:09:06 - [info] [sqlitedb:33875a87.57ade6] opened /home/pi/dbs/iot.db ok
31 Aug 16:09:06 - [info] [zigbee2mqtt-server:zigbee bridge] MQTT Connected
31 Aug 16:09:06 - [info] [mqtt-broker:4c682b3a.2ab5c4] Connected to broker: mqtt://127.0.0.1:1883
31 Aug 16:09:07 - [info] [zigbee2mqtt-server:zigbee bridge] MQTT Subscribed to: "zigbee2mqtt/#
31 Aug 16:09:07 - [info] [vsh-connection:maureen@scargill.org] Attempting MQTT connection: a1pv0eq8s016ut-ats.iot.eu-west-1.amazonaws.com:8883 (clientId: vsht-35299d51-81e1-425e-941f-0fc7a2d05aba)
31 Aug 16:09:07 - [info] [vsh-connection:maureen@scargill.org] MQTT subscribe to topics: ["$aws/things/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/shadow/get/accepted","vsh/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/+/directive","vsh/service","vsh/version/3.0.9/+","vsh/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/service"]
31 Aug 16:09:07 - [info] [api-server:Token] SSE connection success
31 Aug 16:09:07 - [info] [zigbee2mqtt-out:d732b6c81e2f1bf2] Published to mqtt topic: zigbee2mqtt/aliexpress-zigbee/set : {"state":"off"}
31 Aug 16:09:07 - [info] [zigbee2mqtt-out:1chzigbee chandelier] Published to mqtt topic: zigbee2mqtt/1chzigbee/set : {"state":"off"}
31 Aug 16:09:08 - [error] [ewelink-power-state-write:Sonoff POWR3] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-event-listener:48c32274c372c9f2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-devices:newewelink] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-power-state-write:dab620394d937261] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-event-listener:4a0ceb0ff33845fc] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-power-state-read:nspanel] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-power-state-write:6a4b363d3f37c745] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-generic-device:ns panel] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-event-listener:3c81fc76128f5a0c] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-event-listener:683fecb41fe999ea] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-power-state-write:Sonoff ZBMINIL2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-power-state-read:3ab817c96eac57e1] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-power-state-write:NSPANEL out2 on off] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-event-listener:MiniR2 state] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-power-state-write:MiniR2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-event-listener:cd94f107300258ed] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [error] [ewelink-devices:hmm] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:09:08 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
31 Aug 16:09:08 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
Error: Connection closed
    at /home/pi/.node-red/node_modules/async-mqtt/node_modules/mqtt/lib/client.js:206:29
    at Array.forEach (<anonymous>)
    at flushVolatile (/home/pi/.node-red/node_modules/async-mqtt/node_modules/mqtt/lib/client.js:204:24)
    at TLSSocket.<anonymous> (/home/pi/.node-red/node_modules/async-mqtt/node_modules/mqtt/lib/client.js:475:5)
    at TLSSocket.emit (node:events:526:35)
    at node:net:323:12
    at TCP.done (node:_tls_wrap:588:7)
31 Aug 16:09:14 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
31 Aug 16:09:19 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected

Seems like it's up - but for new serial issue.....

That suggests that the serial node is also not the latest.
If you go into Manage Palette is it showing all nodes up to date?
If they are then I suggest that from ~/.node-red you
npm remove node-red-node-serialport
npm install node-red-node-serialport
If it shows errors then post them, otherwise restart node-red.

Serial port bang up to date according to pallette manager 1.0.4 - updated in earlier part of this discussion. Anyway it doesnt work so I''l remove/add as you suggest in the .node-red folder. Doing that now..

Well, the removal stopped NR - which then came back up, so I did the install...
No error messages so:
node-red-stop
node-red-start

em, no - still no serial port.

pi@mainpi:~:16:53[0]> node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.19:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
31 Aug 16:54:39 - [info]
Welcome to Node-RED
===================
31 Aug 16:54:39 - [info] Node-RED version: v3.0.2
31 Aug 16:54:39 - [info] Node.js  version: v18.17.1
31 Aug 16:54:39 - [info] Linux 5.10.103-v7l+ arm LE
31 Aug 16:54:40 - [info] Loading palette nodes
31 Aug 16:54:46 - [info] Worldmap version 2.33.0
31 Aug 16:54:47 - [info] Dashboard version 3.5.0 started at /ui
It looks like serialport didn't install properly.
More information can be found here https://serialport.io/docs/guide-installation
The result of requiring the package is: undefined
Error: Could not locate the bindings file. Tried:
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/out/Debug/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/Debug/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/out/Release/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/Release/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/default/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/compiled/18.17.1/linux/arm/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/lib/binding/node-v108-linux-arm/bindings.node
    at bindings (/home/pi/.node-red/node_modules/@serialport/bindings/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/@serialport/bindings/lib/linux.js:2:36)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/@serialport/bindings/lib/index.js:14:22)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/serialport/lib/index.js:2:17)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/firmata/lib/com.js:44:18)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/firmata/lib/firmata.js:3:40)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at module.exports (/home/pi/.node-red/node_modules/node-red-node-arduino/35-arduino.js:5:17)
    at loadNodeSet (/usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js:366:27)
    at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js:460:31
    at Array.forEach (<anonymous>) {
  tries: [
    '/home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/out/Debug/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/Debug/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/out/Release/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/Release/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/build/default/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/compiled/18.17.1/linux/arm/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node',
    '/home/pi/.node-red/node_modules/@serialport/bindings/lib/binding/node-v108-linux-arm/bindings.node'
  ]
}
31 Aug 16:54:48 - [warn] ------------------------------------------------------
31 Aug 16:54:48 - [warn] [node-red-node-arduino/arduino] Missing serialport dependency
31 Aug 16:54:48 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red
31 Aug 16:54:48 - [warn] ------------------------------------------------------
31 Aug 16:54:48 - [info] Settings file  : /home/pi/.node-red/settings.js
31 Aug 16:54:48 - [info] HTTP Static    : /home/pi/.node-red/public > /
31 Aug 16:54:48 - [info] Context store  : 'default' [module=localfilesystem]
31 Aug 16:54:48 - [info] User directory : /home/pi/.node-red
31 Aug 16:54:48 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
31 Aug 16:54:48 - [info] Flows file     : /home/pi/.node-red/flows.json
31 Aug 16:54:48 - [info] Server now running at http://127.0.0.1:1880/
31 Aug 16:54:48 - [warn] Using unencrypted credentials
31 Aug 16:54:48 - [info] Starting flows
31 Aug 16:54:49 - [info] [alexa-remote-account:Peter Scargill] intialising "Peter Scargill" with the PROXY method and NO saved data...
31 Aug 16:54:50 - [info] Started flows
31 Aug 16:54:51 - [warn] [alexa-remote-account:Peter Scargill] open 192.168.1.19:3456 in your browser
Shelly gen1 server is listening on port 10000
31 Aug 16:54:51 - [info] [sqlitedb:6e9a0125.59bc4] opened /home/pi/dbs/iot.db ok
31 Aug 16:54:51 - [info] [sqlitedb:fdbe27fe.fb7848] opened /home/pi/dbs/iot.db ok
31 Aug 16:54:51 - [info] [sqlitedb:33875a87.57ade6] opened /home/pi/dbs/iot.db ok
31 Aug 16:54:51 - [info] [zigbee2mqtt-server:zigbee bridge] MQTT Connected
31 Aug 16:54:51 - [info] [mqtt-broker:4c682b3a.2ab5c4] Connected to broker: mqtt://127.0.0.1:1883
31 Aug 16:54:51 - [info] [zigbee2mqtt-server:zigbee bridge] MQTT Subscribed to: "zigbee2mqtt/#
31 Aug 16:54:52 - [info] [zigbee2mqtt-out:d732b6c81e2f1bf2] Published to mqtt topic: zigbee2mqtt/aliexpress-zigbee/set : {"state":"off"}
31 Aug 16:54:52 - [info] [zigbee2mqtt-out:1chzigbee chandelier] Published to mqtt topic: zigbee2mqtt/1chzigbee/set : {"state":"off"}
31 Aug 16:54:52 - [error] [ewelink-power-state-write:Sonoff  MiniR3] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:52 - [error] [ewelink-power-state-read:nspanel] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:52 - [error] [ewelink-event-listener:3c81fc76128f5a0c] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:52 - [error] [ewelink-power-state-write:sonoff usb mini] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:52 - [info] [vsh-connection:maureen@scargill.org] Attempting MQTT connection: a1pv0eq8s016ut-ats.iot.eu-west-1.amazonaws.com:8883 (clientId: vsht-35299d51-81e1-425e-941f-0fc7a2d05aba)
31 Aug 16:54:52 - [info] [vsh-connection:maureen@scargill.org] MQTT subscribe to topics: ["$aws/things/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/shadow/get/accepted","vsh/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/+/directive","vsh/service","vsh/version/3.0.9/+","vsh/vsht-35299d51-81e1-425e-941f-0fc7a2d05aba/service"]
31 Aug 16:54:53 - [error] [ewelink-event-listener:7cedf82b00c48363] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-devices:newewelink] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-power-state-write:6a4b363d3f37c745] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-event-listener:MiniR2 state] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-power-state-read:3ab817c96eac57e1] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-event-listener:48c32274c372c9f2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-generic-device:ns panel] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-power-state-write:NSPANEL out2 on off] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-power-state-write:MiniR2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-power-state-write:Sonoff ZBMINIL2] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-event-listener:cd94f107300258ed] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-event-listener:4a0ceb0ff33845fc] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [error] [ewelink-event-listener:683fecb41fe999ea] FetchError: invalid json response body at https://eu-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0
31 Aug 16:54:53 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
31 Aug 16:54:53 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
Error: Connection closed
    at /home/pi/.node-red/node_modules/async-mqtt/node_modules/mqtt/lib/client.js:206:29
    at Array.forEach (<anonymous>)
    at flushVolatile (/home/pi/.node-red/node_modules/async-mqtt/node_modules/mqtt/lib/client.js:204:24)
    at TLSSocket.<anonymous> (/home/pi/.node-red/node_modules/async-mqtt/node_modules/mqtt/lib/client.js:475:5)
    at TLSSocket.emit (node:events:526:35)
    at node:net:323:12
    at TCP.done (node:_tls_wrap:588:7)
31 Aug 16:54:58 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
31 Aug 16:55:04 - [info] [vsh-connection:maureen@scargill.org] MQTT disconnected
31 Aug 16:55:09 - [info] [vsh-connection

HELP....

I even tried a reboot - still no serialport - NR seems to be running... but same serial port info in log. I'm absolutely sure I uninstalled serial and reinstalled in the .node-red dir as your instruction. NR was of course running at the time.

Worse - something in there is causing NR to stop and restart...

31 Aug 17:04:17 - [red] Uncaught Exception:
31 Aug 17:04:17 - [error] Error: Can't send data because WebSocket is not opened.
    at exports.throwIf (/home/pi/.node-red/node_modules/websocket-as-promised/src/utils.js:4:11)
    at WebSocketAsPromised.send (/home/pi/.node-red/node_modules/websocket-as-promised/src/index.js:248:5)
    at Timeout._onTimeout (/home/pi/.node-red/node_modules/ewelink-api/src/mixins/openWebSocket.js:39:17)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Service RestartSec=20s expired, scheduling restart.
nodered.service: Scheduled restart job, restart counter is at 2.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
31 Aug 17:04:39 - [info]
Welcome to Node-RED
===================
31 Aug 17:04:39 - [info] Node-RED version: v3.0.2
31 Aug 17:04:39 - [info] Node.js  version: v18.17.1
31 Aug 17:04:39 - [info] Linux 5.10.103-v7l+ arm LE
31 Aug 17:04:40 - [info] Loading palette nodes
31 Aug 17:04:46 - [info] Worldmap version 2.33.0
31 Aug 17:04:47 - [info] Dashboard version 3.5.0 started at /ui
It looks like serialport didn't install properly.
More information can be found here https://serialport.io/docs/guide-installation
The result of requiring the package is: undefined
Error: Could not locate the bindings file. Tried:
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node
 โ†’ /home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node

Probably worth trying the sledgehammer technique (metaphorically, not literally).
Rename ~/.node_modules and ~/.node-red/package-lock.json
Then from ~/.node-red
npm install
Then have a cup of coffee or go for a jog while it re-installs all the nodes.

I don't think it is anything to do with this problem but you seem to have three different versions of the midnight red theme installed. From package.json
"@node-red-contrib-themes/midnight-red": "^1.5.1",
"@node-red-contrib-themes/theme-collection": "^2.0.1",
"node-red-contrib-theme-midnight-red": "^1.0.0-beta.10",

You might like to npm uninstall each of those and then install the latest collection, which is compatible with the latest node-red
npm install @node-red-contrib-themes/theme-collection
which should give you 3.0.6 I think.
I am surprised again that the procedure using npm outdated that you said you did earlier did not say that it needed updating.