# Node-RED is crashing after startup

**URL:** <https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106>\
**Category:** General\
**Created:** [13 April 2021 13:24 UTC](https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106 "2021-04-13T13:24:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AleCaste18](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alecaste18/32/40238_2.png) [@AleCaste18](https://discourse.nodered.org/u/AleCaste18)\
**Post date:** [13 April 2021 13:24 UTC](https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106/1 "2021-04-13T13:24:26Z")

</div>

Hi node-RED forum,

I'm having trouble in launching node-RED.  
I have installed [this module](https://flows.nodered.org/node/node-red-contrib-ecb-euro-exchange-rates) 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

```auto
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!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 April 2021 13:57 UTC](https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106/2 "2021-04-13T13:57:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 April 2021 14:09 UTC](https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106/3 "2021-04-13T14:09:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AleCaste18](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alecaste18/32/40238_2.png) [@AleCaste18](https://discourse.nodered.org/u/AleCaste18)\
**Post date:** [13 April 2021 14:15 UTC](https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106/4 "2021-04-13T14:15:59Z")

</div>

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.

```auto
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

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 April 2021 14:18 UTC](https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106/5 "2021-04-13T14:18:31Z")

</div>

> [@AleCaste18](#):
>
> I have backed up the flows, should I do a clean installation of node-RED?

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.

---

<div class="post-metadata">

**Author:** ![AleCaste18](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alecaste18/32/40238_2.png) [@AleCaste18](https://discourse.nodered.org/u/AleCaste18)\
**Post date:** [13 April 2021 14:30 UTC](https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106/6 "2021-04-13T14:30:46Z")

</div>

```auto
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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 April 2021 14:31 UTC](https://discourse.nodered.org/t/node-red-is-crashing-after-startup/44106/7 "2021-04-27T14:31:45Z")

</div>

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