Riot-nodes error

I said...

I update the NR.
Then i install the riot project. Can't upload the whole report because it is too big

/home/pi/.cache/node-gyp/12.18.4/include/node/node.h:642:3: note: in expansion of macro โ€˜NODE_MODULE_Xโ€™
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../fs-ext.cc:572:3: note: in expansion of macro โ€˜NODE_MODULEโ€™
   NODE_MODULE(fs_ext, init)
   ^~~~~~~~~~~
make: *** [fs-ext.target.mk:109: Release/obj.target/fs-ext/fs-ext.o] Error 1
make: Leaving directory '/home/pi/.node-red/node_modules/fs-ext/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.51-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/pi/.node-red/node_modules/fs-ext
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN node-red-contrib-ui-led@0.3.3 requires a peer of node-red-dashboard@2.23.x but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/zigbee-herdsman-converters/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/zigbee-herdsman/node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/zigbee-herdsman/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 (node_modules/bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-ext@0.5.0 (node_modules/fs-ext):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-ext@0.5.0 install: `node-gyp configure build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ riot-xbee@0.0.1
added 1 package and audited 1982 packages in 75.444s

65 packages are looking for funding
  run `npm fund` for details

found 353 vulnerabilities (73 low, 68 moderate, 211 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
pi@raspberrypi:~/.node-red $ 

Then try to run NR and it stuck in to some cycle

Starting as a systemd service.
10 Jul 20:23:38 - [info]
Welcome to Node-RED
===================
10 Jul 20:23:38 - [info] Node-RED version: v1.3.5
10 Jul 20:23:38 - [info] Node.js  version: v12.18.4
10 Jul 20:23:38 - [info] Linux 5.4.51-v7l+ arm LE
10 Jul 20:23:39 - [info] Loading palette nodes
10 Jul 20:23:48 - [info] Dashboard up and running
10 Jul 20:23:52 - [info] Dashboard version 2.20.0 started at /ui
10 Jul 20:23:52 - [warn] ------------------------------------------------------
10 Jul 20:23:52 - [warn] [node-red-contrib-usb/adkinit] SyntaxError: Invalid or unexpected token (line:59)
10 Jul 20:23:52 - [warn] [node-red-contrib-mqtt-env/mqtt-env] Error: Cannot find module '/usr/lib/node_modules/node-red/red/red'
Require stack:
- /home/pi/.node-red/node_modules/node-red-contrib-mqtt-env/lib/mqttConnectionPool.js
- /home/pi/.node-red/node_modules/node-red-contrib-mqtt-env/mqtt-env.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
10 Jul 20:23:52 - [warn] [node-red-contrib-mqttssl/mqttssl] Error: Cannot find module '/usr/lib/node_modules/node-red/red/red'
Require stack:
- /home/pi/.node-red/node_modules/node-red-contrib-mqttssl/lib/mqttClientPool.js
- /home/pi/.node-red/node_modules/node-red-contrib-mqttssl/mqttssl.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
10 Jul 20:23:52 - [warn] [node-red-qnap-blockly/blockly] Type already registered
10 Jul 20:23:52 - [warn] [riot-xbee/riot-xbee] Error: Cannot find module '/home/pi/.node-red/node_modules/riot-xbee/riot-xbee.js'
Require stack:
- /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
10 Jul 20:23:52 - [warn] ------------------------------------------------------
10 Jul 20:23:52 - [info] Settings file  : /home/pi/.node-red/settings.js
10 Jul 20:23:52 - [info] Context store  : 'default' [module=memory]
10 Jul 20:23:52 - [info] User directory : /home/pi/.node-red
10 Jul 20:23:52 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Jul 20:23:52 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
10 Jul 20:23:52 - [red] Uncaught Exception:
10 Jul 20:23:52 - Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
    at Server.setupListenHandle [as _listen2] (net.js:1313:16)
    at listenInCluster (net.js:1361:12)
    at doListen (net.js:1498:7)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
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 11.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
10 Jul 20:24:14 - [info]
Welcome to Node-RED
===================

Why are you using node-red-contrib-mqttssl?

Uninstall it. It is nearly 7 years old. Use the built in MQTT nodes.

I used npm remove node-red-contrib-mqttssl, correct?

i have this

Starting as a systemd service.
10 Jul 21:06:26 - [info]
Welcome to Node-RED
===================
10 Jul 21:06:26 - [info] Node-RED version: v1.3.5
10 Jul 21:06:26 - [info] Node.js  version: v12.18.4
10 Jul 21:06:26 - [info] Linux 5.4.51-v7l+ arm LE
10 Jul 21:06:27 - [info] Loading palette nodes
10 Jul 21:06:36 - [info] Dashboard up and running
10 Jul 21:06:39 - [info] Dashboard version 2.20.0 started at /ui
10 Jul 21:06:40 - [warn] ------------------------------------------------------
10 Jul 21:06:40 - [warn] [node-red-contrib-usb/adkinit] SyntaxError: Invalid or unexpected token (line:59)
10 Jul 21:06:40 - [warn] [node-red-contrib-mqtt-env/mqtt-env] Error: Cannot find module '/usr/lib/node_modules/node-red/red/red'
Require stack:
- /home/pi/.node-red/node_modules/node-red-contrib-mqtt-env/lib/mqttConnectionPool.js
- /home/pi/.node-red/node_modules/node-red-contrib-mqtt-env/mqtt-env.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
10 Jul 21:06:40 - [warn] [node-red-contrib-mqttssl/mqttssl] Error: Cannot find module '/usr/lib/node_modules/node-red/red/red'
Require stack:
- /home/pi/.node-red/node_modules/node-red-contrib-mqttssl/lib/mqttClientPool.js
- /home/pi/.node-red/node_modules/node-red-contrib-mqttssl/mqttssl.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
10 Jul 21:06:40 - [warn] [node-red-qnap-blockly/blockly] Type already registered
10 Jul 21:06:40 - [warn] [riot-xbee/riot-xbee] Error: Cannot find module '/home/pi/.node-red/node_modules/riot-xbee/riot-xbee.js'
Require stack:
- /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
10 Jul 21:06:40 - [warn] ------------------------------------------------------
10 Jul 21:06:40 - [info] Settings file  : /home/pi/.node-red/settings.js
10 Jul 21:06:40 - [info] Context store  : 'default' [module=memory]
10 Jul 21:06:40 - [info] User directory : /home/pi/.node-red
10 Jul 21:06:40 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Jul 21:06:40 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
10 Jul 21:06:40 - [red] Uncaught Exception:
10 Jul 21:06:40 - Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
    at Server.setupListenHandle [as _listen2] (net.js:1313:16)
    at listenInCluster (net.js:1361:12)
    at doListen (net.js:1498:7)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
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 83.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
10 Jul 21:07:02 - [info]
Welcome to Node-RED
===================

It is still there. You Also need to get rid of node-red-contrib-mqtt-env

Did you npm uninstall from the ~/.node-red folder?

cd ~/.node-red
npm uninstall node-red-contrib-mqtt-env
npm uninstall node-red-contrib-mqttssl

sudo npm uninstall -g node-red-contrib-mqtt-env
sudo npm uninstall -g node-red-contrib-mqttssl

I uninstall, then try this

sudo npm uninstall -g node-red-contrib-mqtt-env
sudo npm uninstall -g node-red-contrib-mqttssl

And got this

pi@raspberrypi:~ $ cd ~/.node-red
pi@raspberrypi:~/.node-red $ sudo npm uninstall -g node-red-contrib-mqtt-env
up to date in 0.169s
pi@raspberrypi:~/.node-red $ sudo npm uninstall -g node-red-contrib-mqttssl
up to date in 0.181s


   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
   โ”‚                                                                โ”‚
   โ”‚      New major version of npm available! 6.14.6 โ†’ 7.19.1       โ”‚
   โ”‚   Changelog: https://github.com/npm/cli/releases/tag/v7.19.1   โ”‚
   โ”‚               Run npm install -g npm to update!                โ”‚
   โ”‚                                                                โ”‚
   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

pi@raspberrypi:~/.node-red $ 

And again this

Starting as a systemd service.
10 Jul 21:38:29 - [info]
Welcome to Node-RED
===================
10 Jul 21:38:29 - [info] Node-RED version: v1.3.5
10 Jul 21:38:29 - [info] Node.js  version: v12.18.4
10 Jul 21:38:29 - [info] Linux 5.4.51-v7l+ arm LE
10 Jul 21:38:30 - [info] Loading palette nodes
10 Jul 21:38:38 - [info] Dashboard up and running
10 Jul 21:38:42 - [info] Dashboard version 2.20.0 started at /ui
10 Jul 21:38:43 - [warn] ------------------------------------------------------
10 Jul 21:38:43 - [warn] [node-red-contrib-usb/adkinit] SyntaxError: Invalid or unexpected token (line:59)
10 Jul 21:38:43 - [warn] [node-red-qnap-blockly/blockly] Type already registered
10 Jul 21:38:43 - [warn] [riot-xbee/riot-xbee] Error: Cannot find module '/home/pi/.node-red/node_modules/riot-xbee/riot-xbee.js'
Require stack:
- /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
10 Jul 21:38:43 - [warn] ------------------------------------------------------
10 Jul 21:38:43 - [warn] Missing node modules:
10 Jul 21:38:43 - [warn]  - node-red-contrib-mqtt-env (1.0.0): mqtt-env in, mqtt-env out, mqtt-env-broker
10 Jul 21:38:43 - [warn]  - node-red-contrib-mqttssl (0.0.5): mqttssl in, mqttssl out, mqttssl-broker
10 Jul 21:38:43 - [info] Removing modules from config
10 Jul 21:38:43 - [info] Settings file  : /home/pi/.node-red/settings.js
10 Jul 21:38:43 - [info] Context store  : 'default' [module=memory]
10 Jul 21:38:43 - [info] User directory : /home/pi/.node-red
10 Jul 21:38:43 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Jul 21:38:43 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
10 Jul 21:38:43 - [red] Uncaught Exception:
10 Jul 21:38:43 - Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
    at Server.setupListenHandle [as _listen2] (net.js:1313:16)
    at listenInCluster (net.js:1361:12)
    at doListen (net.js:1498:7)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
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 136.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
10 Jul 21:39:05 - [info]
Welcome to Node-RED
===================

So now start node-red in safe mode (as you were shown before) and remove missing nodes and deploy.

Note, these nodes can be replaced with built in mqtt nodes.

Note also, they might be config nodes in the right sidebar (not necessarily on the editor tabs)

This means node-red is already running.

Use node-red-stop to stop node-red service.

You did not run the right command to uninstall the modules.

In the .node-red directory run npm uninstall <module-name> without sudo and without the -g option.

I asked him to do both nick (incase an old global install had been done)

Yes, you asked him to do that, but the console output he shared shows he didn't.

I did everything you told me.
I stop NR, but when I call it from a browser it still pop-up?
What you mean by safe mode?
How to do the replacement with built in mqtt nodes?

Stop node-red

node-red-stop

Start in safe mode

node-red --safe

Open node-red in browser

Use Search ctrl-f and search for all instances of...

  • mqtt-env
  • mqttssl

Delete them all, deploy.

Even when i stop the NR i still can load it from Browser, is it normal?
By using Search (ctrl-f) for all instances of mqtt-env and mqtt ssl, i don't find them.
When i use node-red --safe, i've got this:

pi@raspberrypi:~ $ node-red --safe
11 Jul 13:55:28 - [info] 

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

11 Jul 13:55:28 - [info] Node-RED version: v1.3.5
11 Jul 13:55:28 - [info] Node.js  version: v12.18.4
11 Jul 13:55:28 - [info] Linux 5.4.51-v7l+ arm LE
11 Jul 13:55:29 - [info] Loading palette nodes
11 Jul 13:55:52 - [info] Dashboard up and running
11 Jul 13:55:56 - [info] Dashboard version 2.20.0 started at /ui
11 Jul 13:55:56 - [warn] ------------------------------------------------------
11 Jul 13:55:56 - [warn] [node-red-contrib-usb/adkinit] SyntaxError: Invalid or unexpected token (line:59)
11 Jul 13:55:56 - [warn] [node-red-qnap-blockly/blockly] Type already registered
11 Jul 13:55:56 - [warn] [riot-xbee/riot-xbee] Error: Cannot find module '/home/pi/.node-red/node_modules/riot-xbee/riot-xbee.js'
Require stack:
- /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
11 Jul 13:55:56 - [warn] ------------------------------------------------------
11 Jul 13:55:56 - [warn] Missing node modules:
11 Jul 13:55:56 - [warn]  - node-red-contrib-mqtt-env (1.0.0): mqtt-env in, mqtt-env out, mqtt-env-broker
11 Jul 13:55:56 - [warn]  - node-red-contrib-mqttssl (0.0.5): mqttssl in, mqttssl out, mqttssl-broker
11 Jul 13:55:56 - [info] Removing modules from config
11 Jul 13:55:56 - [info] Settings file  : /home/pi/.node-red/settings.js
11 Jul 13:55:56 - [info] Context store  : 'default' [module=memory]
11 Jul 13:55:56 - [info] User directory : /home/pi/.node-red
11 Jul 13:55:56 - [warn] Projects disabled : editorTheme.projects.enabled=false
11 Jul 13:55:56 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
11 Jul 13:55:57 - [red] Uncaught Exception:
11 Jul 13:55:57 - Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
    at Server.setupListenHandle [as _listen2] (net.js:1313:16)
    at listenInCluster (net.js:1361:12)
    at doListen (net.js:1498:7)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
pi@raspberrypi:~ $ 

When i run NR via Start-Programming, i've got this similar cycle like before

Starting as a systemd service.
11 Jul 14:13:44 - [info]
Welcome to Node-RED
===================
11 Jul 14:13:44 - [info] Node-RED version: v1.3.5
11 Jul 14:13:44 - [info] Node.js  version: v12.18.4
11 Jul 14:13:44 - [info] Linux 5.4.51-v7l+ arm LE
11 Jul 14:13:45 - [info] Loading palette nodes
11 Jul 14:13:54 - [info] Dashboard up and running
11 Jul 14:13:58 - [info] Dashboard version 2.20.0 started at /ui
11 Jul 14:13:58 - [warn] ------------------------------------------------------
11 Jul 14:13:58 - [warn] [node-red-contrib-usb/adkinit] SyntaxError: Invalid or unexpected token (line:59)
11 Jul 14:13:58 - [warn] [node-red-qnap-blockly/blockly] Type already registered
11 Jul 14:13:58 - [warn] [riot-xbee/riot-xbee] Error: Cannot find module '/home/pi/.node-red/node_modules/riot-xbee/riot-xbee.js'
Require stack:
- /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
11 Jul 14:13:58 - [warn] ------------------------------------------------------
11 Jul 14:13:58 - [warn] Missing node modules:
11 Jul 14:13:58 - [warn]  - node-red-contrib-mqtt-env (1.0.0): mqtt-env in, mqtt-env out, mqtt-env-broker
11 Jul 14:13:58 - [warn]  - node-red-contrib-mqttssl (0.0.5): mqttssl in, mqttssl out, mqttssl-broker
11 Jul 14:13:58 - [info] Removing modules from config
11 Jul 14:13:58 - [info] Settings file  : /home/pi/.node-red/settings.js
11 Jul 14:13:58 - [info] Context store  : 'default' [module=memory]
11 Jul 14:13:58 - [info] User directory : /home/pi/.node-red
11 Jul 14:13:58 - [warn] Projects disabled : editorTheme.projects.enabled=false
11 Jul 14:13:58 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
11 Jul 14:13:58 - [red] Uncaught Exception:
11 Jul 14:13:58 - Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
    at Server.setupListenHandle [as _listen2] (net.js:1313:16)
    at listenInCluster (net.js:1361:12)
    at doListen (net.js:1498:7)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
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 1.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
11 Jul 14:14:20 - [info]
Welcome to Node-RED
===================

This means node-red is still running.


for clarification

when you install using the official script, it creates a service runner for node-red. It also provides 3 helper commands...

  • node-red-start - start node-red as a background service
  • node-red-stop - stop node-red service
  • node-red-log - show log of running service

When you type node-red or node-red --safe it starts up ANOTHER node-red (and therefore the error seen above)


Do the following..

  1. Stop node-red service: node-red-stop
  2. Stop any other node-red running in a terminal ctrl+c
  3. Start in safe mode: node-red --safe
  4. Open node-red in browser
  5. Use Search ctrl-f and search for all instances of...
    • mqtt-env
    • mqttssl
      Delete them all
  6. deploy.

Once node-red is running normally, you can quit the terminal version (ctrl+c) and restart the node-red service node-red-start

I try again, but can't stop NR

Type in ps -A | grep node-red

then you will see any process IDs for node-red, then you can kill it with kill xxxx where xxxx is the PID

e.g...

image

As I said before, if you dont press the reply attached to my comment, i dont know you have replied.

Did you start node-red as an sudo?

do sudo kill 2926

I think it still running

pi@raspberrypi:~ $ ps -A | grep node-red
 2926 ?        00:00:14 node-red
pi@raspberrypi:~ $ kill 2926
bash: kill: (2926) - Operation not permitted
pi@raspberrypi:~ $ kill 2926
bash: kill: (2926) - Operation not permitted
pi@raspberrypi:~ $ sudo kill 2926
pi@raspberrypi:~ $ sudo node-red-stop

Stop Node-RED
 
Use   node-red-start   to start Node-RED again
 
pi@raspberrypi:~ $ sudo node-red-log

 
- /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
11 Jul 14:29:27 - [warn] ------------------------------------------------------
11 Jul 14:29:27 - [warn] Missing node modules:
11 Jul 14:29:27 - [warn]  - node-red-contrib-mqtt-env (1.0.0): mqtt-env in, mqtt-env out, mqtt-env-broker
11 Jul 14:29:27 - [warn]  - node-red-contrib-mqttssl (0.0.5): mqttssl in, mqttssl out, mqttssl-broker
11 Jul 14:29:27 - [info] Removing modules from config
11 Jul 14:29:27 - [info] Settings file  : /home/pi/.node-red/settings.js
11 Jul 14:29:27 - [info] Context store  : 'default' [module=memory]
11 Jul 14:29:27 - [info] User directory : /home/pi/.node-red
11 Jul 14:29:27 - [warn] Projects disabled : editorTheme.projects.enabled=false
11 Jul 14:29:27 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
11 Jul 14:29:27 - [red] Uncaught Exception:
11 Jul 14:29:27 - Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
    at Server.setupListenHandle [as _listen2] (net.js:1313:16)
    at listenInCluster (net.js:1361:12)
    at doListen (net.js:1498:7)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
Stopped Node-RED graphical event wiring tool

After safe run i've got this

pi@raspberrypi:~ $ sudo node-red --safe
11 Jul 15:25:27 - [info] 

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

11 Jul 15:25:27 - [info] Node-RED version: v1.3.5
11 Jul 15:25:27 - [info] Node.js  version: v12.18.4
11 Jul 15:25:27 - [info] Linux 5.4.51-v7l+ arm LE
11 Jul 15:25:28 - [info] Loading palette nodes
11 Jul 15:25:29 - [warn] ------------------------------------------------------
11 Jul 15:25:29 - [warn] [riot-xbee/riot-xbee] Error: Cannot find module '/usr/lib/node_modules/riot-nodes-master/riot-xbee.js'
Require stack:
- /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
11 Jul 15:25:29 - [warn] ------------------------------------------------------
11 Jul 15:25:29 - [info] Settings file  : /root/.node-red/settings.js
11 Jul 15:25:29 - [info] Context store  : 'default' [module=memory]
11 Jul 15:25:29 - [info] User directory : /root/.node-red
11 Jul 15:25:29 - [warn] Projects disabled : editorTheme.projects.enabled=false
11 Jul 15:25:29 - [info] Flows file     : /root/.node-red/flows_raspberrypi.json
11 Jul 15:25:29 - [info] Creating new flow file
11 Jul 15:25:29 - [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.
---------------------------------------------------------------------

11 Jul 15:25:29 - [error] Unable to listen on http://127.0.0.1:1880/
11 Jul 15:25:29 - [error] Error: port in use
pi@raspberrypi:~ $