Node-RED is crashing after startup

Hi node-RED forum,

I'm having trouble in launching node-RED.
I have installed this module but i'm failing in unistalling it both using the npm command or lookin for it in the file manager.

Pasting here the error in order to have further helpful information

C:\Users\lino->node-red
13 Apr 15:23:20 - [info]

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

13 Apr 15:23:20 - [info] Node-RED version: v1.2.9
13 Apr 15:23:20 - [info] Node.js  version: v14.15.5
13 Apr 15:23:20 - [info] Windows_NT 10.0.19042 x64 LE
13 Apr 15:23:21 - [info] Loading palette nodes
13 Apr 15:23:21 - [error] Failed to start server:
13 Apr 15:23:21 - [error] TypeError: Cannot read property 'forEach' of undefined
    at Object.addModule (C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\registry.js:186:27)
    at C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\loader.js:108:30
    at tryCatchReject (C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:845:30)
    at runContinuation1 (C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:804:4)
    at Fulfilled.when (C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:592:4)
    at Pending.run (C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:483:13)
    at Scheduler._drain (C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:62:19)
    at Scheduler.drain (C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:27:9)
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

Thanks in advance for your feedback!

Can you run Node-RED with the safe parameter to stop the nodes loading? If that works then most likely that node is causing an issue.

While you are at it, make a backup and upgrade Node-RED to the latest v1.3.2 if you can.

When you try to uninstall via the command line are you going into the .node-red folder first? If so what copy/paste here the command you are using and what it says.

I launched Node-RED with the safe parameter but it keeps giving me the same error.
I updated node-RED to v1.3.2 and the error has changed.

C:\Users\lino->node-red
13 Apr 16:07:23 - [info]

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

13 Apr 16:07:23 - [info] Node-RED version: v1.3.2
13 Apr 16:07:23 - [info] Node.js  version: v14.15.5
13 Apr 16:07:23 - [info] Windows_NT 10.0.19042 x64 LE
13 Apr 16:07:23 - [info] Loading palette nodes
13 Apr 16:07:23 - [error] Failed to start server:
13 Apr 16:07:23 - [error] TypeError: Cannot read property 'forEach' of undefined
    at Object.addModule (C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\registry.js:195:27)
    at C:\Users\lino-\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\loader.js:153:34

I have backed up the flows, should I do a clean installation of node-RED?
Thanks

No. This error is related to a node you have installed.

You mentioned you had installed one and was unable to remove it. As @Colin has asked, can you show us the output of trying to remove it so we can see how you are doing it?

It should be a case of running npm remove node-red-contrib-ecb-euro-exchange-rates from within the .node-red directory.

C:\Users\lino->cd .node-red

C:\Users\lino-\.node-red>npm remove node-red-contrib-ecb-euro-exchange-rates
removed 52 packages and audited 168 packages in 1.145s

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

found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

I removed the node with the command you indicated in the path you indicated, now it works!

Thank you very much!

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