Broke node-red - can I fix it somehow?

#1

Guys, I have broke my node-red. I have installed few new packages and it won't start. this is full log from startup. I have already reinstalled NR, that didn't help. Any ideas? Thank you

    Welcome to Node-RED
===================
7 Dec 22:35:05 - [info] Node-RED version: v0.19.5
7 Dec 22:35:05 - [info] Node.js  version: v8.12.0
7 Dec 22:35:05 - [info] Linux 4.14.71-v7+ arm LE
7 Dec 22:35:06 - [info] Loading palette nodes
7 Dec 22:35:13 - [info] Dashboard version 2.11.0 started at /ui
7 Dec 22:35:14 - [warn] ------------------------------------------------------
7 Dec 22:35:14 - [warn] [node-red-contrib-mi-devices/xiaomi-yeelight] Error: /home/bednarz/.node-red/node_modules/node-red-contrib-mi-devices/dist/nodes/yeelight/index.html does not exist
7 Dec 22:35:14 - [warn] [node-red-contrib-mydash/mydash] TypeError: "file" argument must be a non-empty string (line:9)
7 Dec 22:35:14 - [warn] [node-red-contrib-xiaomi-devices/xiaomi-ht] Type already registered
7 Dec 22:35:14 - [warn] [node-red-contrib-xiaomi-devices/xiaomi-magnet] Type already registered
7 Dec 22:35:14 - [warn] [node-red-contrib-xiaomi-devices/xiaomi-motion] Type already registered
7 Dec 22:35:14 - [warn] [node-red-contrib-xiaomi-devices/xiaomi-switch] Type already registered
7 Dec 22:35:14 - [warn] [node-red-contrib-xiaomi-devices/xiaomi-socket] Type already registered
7 Dec 22:35:14 - [warn] [node-red-contrib-xiaomi-devices/xiaomi-socket-wifi] Type already registered
7 Dec 22:35:14 - [warn] [node-red-contrib-xiaomi-devices/xiaomi-configurator] Type already registered
7 Dec 22:35:14 - [warn] ------------------------------------------------------
7 Dec 22:35:14 - [info] Settings file  : /home/bednarz/.node-red/settings.js
7 Dec 22:35:14 - [info] Context store  : 'default' [module=memory]
7 Dec 22:35:14 - [info] User directory : /home/bednarz/.node-red
7 Dec 22:35:14 - [warn] Projects disabled : editorTheme.projects.enabled=false
7 Dec 22:35:14 - [info] Flows file     : /home/bednarz/.node-red/flows_raspberrypi.json
7 Dec 22:35:14 - [info] Server now running at http://127.0.0.1:1880/
Detected device with identifier  130275447  types  Set { 'placeholder', 'miio' }  model  undefined
Detected device with identifier  53865017  types  Set { 'placeholder', 'miio' }  model  undefined
7 Dec 22:35:14 - [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.
---------------------------------------------------------------------
7 Dec 22:35:14 - [info] Waiting for missing types to be registered:
7 Dec 22:35:14 - [info]  - powershell
Detected device with identifier  130275356  types  Set { 'placeholder', 'miio' }  model  undefined
Detected device with identifier  57595030  types  Set { 'placeholder', 'miio' }  model  undefined
Detected device with identifier  87149866  types  Set { 'placeholder', 'miio' }  model  undefined
Detected device with identifier  78253705  types  Set { 'placeholder', 'miio' }  model  undefined
Detected device with identifier  57795237  types  Set { 'placeholder', 'miio' }  model  undefined
Detected device with identifier  87148356  types  Set { 'placeholder', 'miio' }  model  undefined
0 Likes

#2

Hi @Samuel, the main issue is your flows use a node of type powershell but you do not have a module installed that provides that node.

You can either install the missing module and restart node-red, or delete any instances of the powershell node from your flow.

To do the former, go into the directory /home/bednarz/.node-red and run: npm install node-red-contrib-powershell. Then restart Node-RED.

Otherwise, open up the NR editor, find an unknown nodes and delete them, then hit deploy.

0 Likes

#3

thank you for quick response. I have just installed powershell module and now startup process loops with the following error:

(node:3282) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 listening listeners added. Use emitter.setMaxListeners() to increase limit
7 Dec 22:52:10 - [red] Uncaught Exception:
7 Dec 22:52:10 - Error: spawn powershell ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:362:16)
n

Can I somehow remove all powershell related nodes/modules without GUI?

0 Likes

#4

To remove the powershell module run npm remove node-red-contrib-powershell in /home/bednarz/.node-red

Then restart Node-RED. You'll still get the 'flows stopped' error, but you should be able to load the editor. Then go through and find + delete any 'unknown' nodes.

0 Likes

#5

great - thank you - I will report back.

0 Likes

#6

It worked! thank you very much for that!

0 Likes