# Problem with uninstalling modules

**URL:** https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298
**Category:** General
**Created:** [14 February 2022 08:07 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298 "2022-02-14T08:07:51Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 08:07 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/1 "2022-02-14T08:07:51Z")

</div>

Dear all,  
Yesterday I tried to install chatbot node through UI----pallete.  
It started installing...but nothing happened. Most probably I interrupted somewhere. It resulted in very strange behaviour of the server. I managed to at least disable modules inside the node...but I am unable to remove it. Take a look at attached screen?  
How can I remove it through command prompt? I installed node-red with pm2. It is running on vitual machine. When I tried to uninstall, I get this error:

Thank you in advance,

```auto
demokedes@NodeRed:~/.node-red/node_modules$ pm2 uninstall node-red-contrib-chatbot
[PM2][Module] Uninstalling module node-red-contrib-chatbot
[PM2][Module][ERROR] Unknown module

```

 ![Screenshot 2022-02-14 090200](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/d/9d1e1670455b2f54edd7805edbb6c396b2259a60.jpeg)  
 ![Screenshot 2022-02-14 090253](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/4/8416bd2e712446e4470c61f96830bc9cd0b1c4ef.jpeg)  
 ![Screenshot 2022-02-14 090324](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/d/9d8f382c382d2ee3ff53b4d1ee801dc8cbf9fe18.jpeg)

---

<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: [14 February 2022 08:25 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/2 "2022-02-14T08:25:35Z")

</div>

Did you restart Node-RED?

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [14 February 2022 08:36 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/3 "2022-02-14T08:36:31Z")

</div>

Hi ..

The uninstall commands should be run from the `~/.node-red` folder and not from `/node-modules`  
and it should be `npm uninstall node-red-contrib-chatbot`

Im not using pm2 but based on its docs:  
Display all processes status with `pm2 list` to find out the name you gave node-red process for pm2  
then `pm2 restart <node_red_app_name>`

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 08:56 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/4 "2022-02-14T08:56:56Z")

</div>

I restarted it, but it is not helping.  
I have a bigger problem, after checking the logs, I realised node-red is restarting on its own every few minutes. Here is the output of the log.

````auto
0|node-red |
0|node-red | 14 Feb 08:51:38 - [info] Starting flows
0|node-red | 14 Feb 08:51:38 - [info] Started flows

0|node-red | 14 Feb 08:53:05 - [info] Stopping flows
0|node-red | 14 Feb 08:53:05 - [info] Stopped flows
0|node-red | 14 Feb 08:53:07 - [info]
0|node-red | Welcome to Node-RED
0|node-red | ===================
0|node-red | 14 Feb 08:53:07 - [info] Node-RED version: v2.2.0
0|node-red | 14 Feb 08:53:07 - [info] Node.js version: v14.19.0
0|node-red | 14 Feb 08:53:07 - [info] Linux 5.4.0-1069-azure x64 LE
0|node-red | 14 Feb 08:53:07 - [info] Loading palette nodes
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-redbot
0|node-red | BAIL ON node-red-contrib-chatbot/redbot-config
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-telegram-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-universal-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-slack-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-twilio-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-routee-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-msteams-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-facebook-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-viber-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-alexa-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-message
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-analytics
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-context
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-topic
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-voice
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-language
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-parse
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-command
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-document
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-video
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-image
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-sticker
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-animation
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-audio
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-location
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-ask
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-inline-buttons
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-quick-replies
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-generic-template
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-request
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-log
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-qrcode
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-conversation
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-debug
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-waiting
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-authorized
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-transport
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-rivescript
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-messenger-menu
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-messenger-template
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-telegram-menu
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-context-store
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-inline-query
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-dialog
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-rules
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-params
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-dialogflow
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-invoice
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-invoice-shipping
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-extend
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-support-table
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-alexa-card
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-alexa-directive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-broadcast
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-alexa-speech
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-slack-blocks
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-train
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-intent
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-entity
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-save
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-load
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-pop-message
0|node-red | 14 Feb 08:53:09 - [info] Dashboard version 3.1.5 started at /ui
0|node-red | 14 Feb 08:53:09 - [info] Settings file : /home/demokedes/.node-red/settings.js
0|node-red | 14 Feb 08:53:09 - [info] Context store : 'default' [module=memory]
0|node-red | 14 Feb 08:53:09 - [info] User directory : /home/demokedes/.node-red
0|node-red | 14 Feb 08:53:09 - [warn] Flows file name not set. Generating name using hostname.
0|node-red | 14 Feb 08:53:09 - [info] Flows file : /home/demokedes/.node-red/flows_NodeRed.json
0|node-red | 14 Feb 08:53:09 - [info] Server now running at http://127.0.0.1:1880/
0|node-red | 14 Feb 08:53:09 - [warn]
0|node-red | ---------------------------------------------------------------------
0|node-red | Your flow credentials file is encrypted using a system-generated key.
0|node-red | If the system-generated key is lost for any reason, your credentials
0|node-red | file will not be recoverable, you will have to delete it and re-enter
0|node-red | your credentials.
0|node-red | You should set your own key using the 'credentialSecret' option in
0|node-red | your settings file. Node-RED will then re-encrypt your credentials
0|node-red | file using your chosen key the next time you deploy a change.
0|node-red | ---------------------------------------------------------------------
0|node-red | 14 Feb 08:53:09 - [info] Starting flows
0|node-red | 14 Feb 08:53:09 - [info] Started flows
0|node-red | 14 Feb 08:54:36 - [info] Stopping flows
0|node-red | 14 Feb 08:54:36 - [info] Stopped flows
0|node-red | 14 Feb 08:54:37 - [info]
0|node-red | Welcome to Node-RED
0|node-red | ===================
0|node-red | 14 Feb 08:54:37 - [info] Node-RED version: v2.2.0
0|node-red | 14 Feb 08:54:37 - [info] Node.js version: v14.19.0
0|node-red | 14 Feb 08:54:37 - [info] Linux 5.4.0-1069-azure x64 LE
0|node-red | 14 Feb 08:54:38 - [info] Loading palette nodes
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-redbot
0|node-red | BAIL ON node-red-contrib-chatbot/redbot-config
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-telegram-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-universal-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-slack-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-twilio-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-routee-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-msteams-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-facebook-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-viber-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-alexa-receive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-message
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-analytics
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-context
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-topic
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-voice
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-language
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-parse
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-command
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-document
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-video
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-image
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-sticker
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-animation
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-audio
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-location
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-ask
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-inline-buttons
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-quick-replies
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-generic-template
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-request
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-log
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-qrcode
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-conversation
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-debug
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-waiting
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-authorized
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-transport
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-rivescript
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-messenger-menu
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-messenger-template
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-telegram-menu
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-context-store
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-inline-query
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-dialog
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-rules
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-params
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-dialogflow
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-invoice
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-invoice-shipping
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-extend
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-support-table
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-alexa-card
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-alexa-directive
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-broadcast
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-alexa-speech
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-slack-blocks
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-train
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-intent
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-entity
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-save
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-nlp-load
0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-pop-message
0|node-red | 14 Feb 08:54:40 - [info] Dashboard version 3.1.5 started at /ui
0|node-red | 14 Feb 08:54:40 - [info] Settings file : /home/demokedes/.node-red/settings.js
0|node-red | 14 Feb 08:54:40 - [info] Context store : 'default' [module=memory]
0|node-red | 14 Feb 08:54:40 - [info] User directory : /home/demokedes/.node-red
0|node-red | 14 Feb 08:54:40 - [warn] Flows file name not set. Generating name using hostname.
0|node-red | 14 Feb 08:54:40 - [info] Flows file : /home/demokedes/.node-red/flows_NodeRed.json
0|node-red | 14 Feb 08:54:40 - [info] Server now running at http://127.0.0.1:1880/
0|node-red | 14 Feb 08:54:40 - [warn]
0|node-red | --------------------------------------------------------------```
````

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 08:57 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/5 "2022-02-14T08:57:48Z")

</div>

This is the only process:

```auto
demokedes@NodeRed:~$ sudo pm2 list
┌─────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ node-red │ default │ N/A │ fork │ 20092 │ 63s │ 0 │ online │ 0.4% │ 138.8mb │ dem… │ disabled │
└─────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
demokedes@NodeRed:~$

```

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [14 February 2022 09:11 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/6 "2022-02-14T09:11:34Z")

</div>

ok .. so the pm2 process is named `node-red`

1. `pm2 stop node-red`
2. from `~/.node-red` run `npm uninstall node-red-contrib-chatbot`
3. `pm2 restart node-red`

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 09:17 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/7 "2022-02-14T09:17:10Z")

</div>

> [@UnborN](#):
>
> pm2 restart node-red

Dear UnborN,  
I just performed steps you mentioned. Output is following:

```auto
demokedes@NodeRed:~$ pm2 stop node-red
[PM2] Applying action stopProcessId on app [node-red](ids: [0])
[PM2] [node-red](0) ✓
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name │ mode │ ↺ │ status │ cpu │ memory │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0 │ node-red │ fork │ 0 │ stopped │ 0% │ 0b │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
demokedes@NodeRed:~$ cd .node-red
demokedes@NodeRed:~/.node-red$ npm uninstall node-red-contrib-chatbot
removed 1209 packages and audited 717 packages in 14.123s

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

found 38 vulnerabilities (25 moderate, 9 high, 4 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
demokedes@NodeRed:~/.node-red$ pm2 restart node-red

```

But there is still chatbot under list of modules in Palletes and node-red is still restarting every minute or so...  
Any idea?

---

<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: [14 February 2022 09:21 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/8 "2022-02-14T09:21:30Z")

</div>

> [@demokedes](#):
>
> ```auto
> 0|node-red | 14 Feb 08:53:09 - [info] Started flows
> 0|node-red | 14 Feb 08:54:36 - [info] Stopping flows
> 0|node-red | 14 Feb 08:54:36 - [info] Stopped flows
> 
> ```

The fact it is logging that it is stopping means something has sent a signal to shut it down.

Maybe the `pm2` logs have more information?

Is there are particular reason for using `pm2`? It isn't how we'd recommend running it these days.

> [@demokedes](#):
>
> `0|node-red | BAIL ON node-red-contrib-chatbot/chatbot-redbot`

That `BAIL ON` message... looks like we left a console.log in that shouldn't be there... 🙁

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 09:24 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/9 "2022-02-14T09:24:02Z")

</div>

This started after I tried to install this chatbot node. I am now really confused on how to remove it?

```auto
0|node-red | 14 Feb 09:20:20 - [info] Started flows

PM2 | pm2 has been killed by signal, dumping process list before exit...
PM2 | Deleting process 0
PM2 | Stopping app:node-red id:0
0|node-red | 14 Feb 09:21:46 - [info] Stopping flows
0|node-red | 14 Feb 09:21:46 - [info] Stopped flows
PM2 | App [node-red:0] exited with code [0] via signal [SIGINT]
PM2 | pid=22108 msg=process killed
PM2 | Exited peacefully
PM2 | App [node-red:0] starting in -fork mode-
PM2 | TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (22228)
PM2 | at Object.writeFileSync (fs.js:1521:5)
PM2 | at /usr/lib/node_modules/pm2/lib/God/ForkMode.js:264:12
PM2 | at wrapper (/usr/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
PM2 | at next (/usr/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
PM2 | at /usr/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
PM2 | at WriteStream.<anonymous> (/usr/lib/node_modules/pm2/lib/Utility.js:186:13)
PM2 | at WriteStream.emit (events.js:400:28)
PM2 | at WriteStream.emit (domain.js:537:15)
PM2 | at internal/fs/streams.js:340:12
PM2 | at FSReqCallback.oncomplete (fs.js:179:23)
PM2 | App [node-red:0] online
0|node-red | 14 Feb 09:21:48 - [info]
0|node-red | Welcome to Node-RED
0|node-red | ===================
0|node-red | 14 Feb 09:21:48 - [info] Node-RED version: v2.2.0
0|node-red | 14 Feb 09:21:48 - [info

```

---

<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: [14 February 2022 09:25 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/10 "2022-02-14T09:25:35Z")

</div>

> [@demokedes](#):
>
> `pm2 has been killed by signal`

So something outside of both Node-RED and pm2 is sending pm2 a signal to exit.

Could you be hitting a memory limit of the virtual machine or some other limit?

---

<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: [14 February 2022 09:26 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/11 "2022-02-14T09:26:25Z")

</div>

Looking at the node-red-contrib-chatbot's readme, was this node installed globally (as per the readme?)

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 09:29 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/12 "2022-02-14T09:29:27Z")

</div>

As mentioned, I tried to install it through node-red UI (Manage Palette).... but it was not finished successfully.

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [14 February 2022 09:36 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/13 "2022-02-14T09:36:09Z")

</div>

Run `npm list -g --depth 0`  
to check, as Paul asked, if by any chance you have installed the chatbot node globally

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 09:43 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/14 "2022-02-14T09:43:21Z")

</div>

I don't think it is useful:

```auto
demokedes@NodeRed:~/.node-red$ npm list -g --depth 0
/usr/lib
├── azure-iot-device@1.12.2
├── azure-iot-device-mqtt@1.11.2
├── corepack@0.10.0
├── node-red@2.2.0
├── node-red-admin@0.1.5
├── node-red-contrib-azure-iot-hub@0.4.0
├── npm@6.14.16
└── pm2@4.2.3

```

After running: npm uninstall node-red-contrib-chatbot I don't see chatbot node anymore....there is also no more npm uninstall node-red-contrib-chatbot directorey in the node\_modules folder, but it is still causing problems to the server...and it is still under installed nodes in "Manage pallete".

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 09:44 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/15 "2022-02-14T09:44:04Z")

</div>

Since this is virtual machine, I can easily increase the memory, but I don't this is the reason.

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [14 February 2022 10:03 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/16 "2022-02-14T10:03:11Z")

</div>

What if you stop the pm2 process `pm2 stop node-red` and just run node-red normally with `node-red`  
do you get any errors during normal startup ?

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 10:11 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/17 "2022-02-14T10:11:26Z")

</div>

I've tried. It started. And now it didn't restart, or I just don't get any message about restarting.  
What next? Does that mean, something is wrong with pm2? Should I increase the size of VM? Currently I have 1 GB of RAM assigned to it.

```auto
demokedes@NodeRed:~/.node-red$ sudo pm2 stop node-red
[PM2] Applying action stopProcessId on app [node-red](ids: [0])
[PM2] [node-red](0) ✓
┌─────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ node-red │ default │ N/A │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ root │ disabled │
└─────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
demokedes@NodeRed:~/.node-red$ node-red
14 Feb 10:04:56 - [info]

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

14 Feb 10:04:56 - [info] Node-RED version: v2.2.0
14 Feb 10:04:56 - [info] Node.js version: v14.19.0
14 Feb 10:04:56 - [info] Linux 5.4.0-1069-azure x64 LE
14 Feb 10:04:57 - [info] Loading palette nodes
14 Feb 10:04:58 - [info] Dashboard version 3.1.5 started at /ui
14 Feb 10:04:58 - [info] Settings file : /home/demokedes/.node-red/settings.js
14 Feb 10:04:58 - [info] Context store : 'default' [module=memory]
14 Feb 10:04:58 - [info] User directory : /home/demokedes/.node-red
14 Feb 10:04:58 - [warn] Flows file name not set. Generating name using hostname.
14 Feb 10:04:58 - [info] Flows file : /home/demokedes/.node-red/flows_NodeRed.json
14 Feb 10:04:58 - [info] Server now running at http://127.0.0.1:1880/
14 Feb 10:04:58 - [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.
---------------------------------------------------------------------

14 Feb 10:04:58 - [info] Starting flows
14 Feb 10:04:58 - [info] Started flows

```

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [14 February 2022 10:24 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/18 "2022-02-14T10:24:30Z")

</div>

> [@demokedes](#):
>
> What next?

Dont know .. havent thought of that hehe 😉  
at least we know that it appears to be something with pm2

but with the normal start of node-red does chatbot still appear in "Manage pallete" ??

---

<div class="post-metadata">

### Author: ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)
#### Post date: [14 February 2022 10:25 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/19 "2022-02-14T10:25:54Z")

</div>

Yes, it is still there...

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [14 February 2022 10:29 UTC](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298/20 "2022-02-14T10:29:58Z")

</div>

.. and can you remove it through the Manage pallete now that nr is not running through pm2 ?

[Next page](https://discourse.nodered.org/t/problem-with-uninstalling-modules/58298.md?page=2)
