# Unable to start node-red

**URL:** <https://discourse.nodered.org/t/unable-to-start-node-red/19073>\
**Category:** General\
**Created:** [12 December 2019 13:04 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073 "2019-12-12T13:04:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.sakshi997](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@g.sakshi997](https://discourse.nodered.org/u/g.sakshi997)\
**Post date:** [12 December 2019 13:04 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/1 "2019-12-12T13:04:48Z")

</div>

Hi all,  
I have been facing an issue in starting node-red and am unable to figure out why is it happening. The following is the error that it throws whenever i start node-red. I hope you can help me out.

```auto
Welcome to Node-RED
===================

12 Dec 17:50:30 - [info] Node-RED version: v1.0.3
12 Dec 17:50:30 - [info] Node.js version: v12.10.0
12 Dec 17:50:30 - [info] Windows_NT 10.0.17134 x64 LE
12 Dec 17:50:32 - [info] Loading palette nodes
12 Dec 17:50:33 - [error] Failed to start server:
12 Dec 17:50:33 - [error] TypeError: Cannot read property 'forEach' of undefined
    at Object.addModule (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\registry.js:186:27)
    at d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\loader.js:108:30
    at tryCatchReject (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:845:30)
    at runContinuation1 (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:804:4)
    at Fulfilled.when (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:592:4)
    at Pending.run (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:483:13)
    at Scheduler._drain (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:62:19)
    at Scheduler.drain (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:27:9)
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [12 December 2019 13:33 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/2 "2019-12-12T13:33:50Z")

</div>

This probably happened after you added a node in. Can you remember what you did before it happened?

You can start NR in safe mode using the `--safe` option and fix whatever you did.

---

<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:** [12 December 2019 16:25 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/3 "2019-12-12T16:25:40Z")

</div>

> [@zenofmud](#):
>
> You can start NR in safe mode using the `--safe` option and fix whatever you did.

That won't work in this instance as the error is happening whilst loading the palette of nodes, long before the flows are loaded.

It would be good to know if you've added any new nodes recently. This error crops up from time to time but I don't think we know definitively what causes it. But a badly implemented module could do it.

---

<div class="post-metadata">

**Author:** ![g.sakshi997](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@g.sakshi997](https://discourse.nodered.org/u/g.sakshi997)\
**Post date:** [13 December 2019 04:34 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/4 "2019-12-13T04:34:16Z")

</div>

Yes. I did install the AMQP module. ( node-red-contrib-amqp).  
But i did install a fresh node-red after that which still isn't working.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2019 09:16 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/5 "2019-12-13T09:16:48Z")

</div>

To see if the problem is with node-red-contrib-amqp, if you are using a Pi (you didn't mention the platform) you could

1. stop node-red
2. open a terminal window
3. enter `cd .node-red/node_modules`
4. delete the folder with `rm -rf node-red-contrib-amqp`
5. restart node-red

see if you get in now.

---

<div class="post-metadata">

**Author:** ![g.sakshi997](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@g.sakshi997](https://discourse.nodered.org/u/g.sakshi997)\
**Post date:** [13 December 2019 09:19 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/6 "2019-12-13T09:19:49Z")

</div>

oh right, i am using it on windows. not on a pi.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2019 09:31 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/7 "2019-12-13T09:31:47Z")

</div>

you should still be able to remove it by opening a command prompt and changing to your node red directory (\Users\<Username\>.node-red) and then entering  
`npm remove node-red-contrib-amqp`  
and then starting node-red

---

<div class="post-metadata">

**Author:** ![g.sakshi997](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@g.sakshi997](https://discourse.nodered.org/u/g.sakshi997)\
**Post date:** [13 December 2019 10:57 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/8 "2019-12-13T10:57:11Z")

</div>

it still didn't work..

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2019 10:59 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/9 "2019-12-13T10:59:52Z")

</div>

Is it giving the same error?  
Didi you install any other nodes?

---

<div class="post-metadata">

**Author:** ![g.sakshi997](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@g.sakshi997](https://discourse.nodered.org/u/g.sakshi997)\
**Post date:** [13 December 2019 11:02 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/10 "2019-12-13T11:02:47Z")

</div>

Yes, the error is still the same. and No. I did not install any other node. although i have tried to uninstall node-red using npm and deleted the folder from appdata (from temp and roaming folder). But it still didn't work..

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2019 11:09 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/11 "2019-12-13T11:09:13Z")

</div>

What other nodes do you have installed? You should be able to go to `\Users\<Username>\.node-red\node_modules` and list all the files starting with `node-red-...` and that should show all the node-red and contrib modules.

---

<div class="post-metadata">

**Author:** ![g.sakshi997](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@g.sakshi997](https://discourse.nodered.org/u/g.sakshi997)\
**Post date:** [13 December 2019 11:11 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/12 "2019-12-13T11:11:27Z")

</div>

There are no extra modules installed. Only the default modules are there.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2019 11:37 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/13 "2019-12-13T11:37:13Z")

</div>

I'm at a loss, maybe someone else will have an idea.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [13 December 2019 13:45 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/14 "2019-12-13T13:45:09Z")

</div>

> [@zenofmud](#):
>
> ...and then entering  
> `npm remove node-red-contrib-amqp`  
> and then starting node-red

Shouldn't that be `npm uninstall node-red-contrib-amqp`

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2019 14:24 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/15 "2019-12-13T14:24:21Z")

</div>

Oops, you are right, mixing my ‘npm’ and ‘apt’. Thanks for catching that

---

<div class="post-metadata">

**Author:** ![g.sakshi997](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@g.sakshi997](https://discourse.nodered.org/u/g.sakshi997)\
**Post date:** [16 December 2019 06:19 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/16 "2019-12-16T06:19:22Z")

</div>

unfortunately, even this didn't work.!

---

<div class="post-metadata">

**Author:** ![arda](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@arda](https://discourse.nodered.org/u/arda)\
**Post date:** [19 December 2019 14:23 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/17 "2019-12-19T14:23:29Z")

</div>

> [@g.sakshi997](#):
>
> node-red-contrib-amqp

I had the same problem. From your log it seems you are using Windows. I had to manually remove the folder from %APPDATA%\npm\node\_modules

---

<div class="post-metadata">

**Author:** ![voom](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@voom](https://discourse.nodered.org/u/voom)\
**Post date:** [2 July 2020 22:25 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/18 "2020-07-02T22:25:48Z")

</div>

I've got the same issue on Windows 10. Removed all amqp related folders from \Users\<Username\>.node-red\node\_modules\ and managed to start again.

---

<div class="post-metadata">

**Author:** ![brij300](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@brij300](https://discourse.nodered.org/u/brij300)\
**Post date:** [30 July 2020 15:33 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/19 "2020-07-30T15:33:53Z")

</div>

Hi Sakshi,

To completely remove the module you need to follow below steps:

1. Do npm uninstall node-red-contrib-amqp
2. npm uninstall @node-red-tools/node-red-contrib-amqp
3. Find traces of the module in the location : C:\Users\\<Your\_PC\_username\>\.node-red\node\_modules\
4. Delete node-red-contrib-amqp folder if any
5. Now go to .config.json at location "C:\Users\\<Your\_PC\_username\>\.node-red"
6. Delete the node-red-contrib-amqp module mentioned in .config.json. So, it will not load the setting while starting the node red.

Note: Please change the drive name accordingly.

Let me know if it works!

---

<div class="post-metadata">

**Author:** ![Khaledpro](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/khaledpro/32/38910_2.png) [@Khaledpro](https://discourse.nodered.org/u/Khaledpro)\
**Post date:** [3 October 2020 02:09 UTC](https://discourse.nodered.org/t/unable-to-start-node-red/19073/20 "2020-10-03T02:09:18Z")

</div>

Please someone help me in this I have the same problem and I can't solve and i need to work with node-red

[Next page](https://discourse.nodered.org/t/unable-to-start-node-red/19073.md?page=2)
