Problem with uninstalling modules

I've tried, but no sucess...

Failed to remove: node-red-contrib-chatbot

Module not found

Check the log for more information

Uh....anyone else has any idea how to solve it?
Regards,
Rok

From the .node-red folder what do these commands show
npm list -g node-red-contrib-chatbot
npm list node-red-contrib-chatbot

I just upgraded the Virtual machine....with 4 times bigger resources. No change...
Output of the commands...

demokedes@NodeRed:~$ cd .node-red/
demokedes@NodeRed:~/.node-red$ npm list -g node-red-contrib-chatbot
/usr/lib
ā””ā”€ā”€ (empty)

demokedes@NodeRed:~/.node-red$ npm list node-red-contrib-chatbot
node-red-project@0.0.1 /home/demokedes/.node-red
ā””ā”€ā”€ (empty)

Have a look in .node-red/.config.nodes.json - this is a list of all modules the runtime has discovered and where they are being loaded from. That will tell you exactly where the chatbot module is coming from.

Dear knolleary,
I take a look....this is the ouput. Path that the ouput is refering to, doesn exist anymore. Under this node-red-contri-chatbot there are additional 180 nodes. Can i simply delete them from the file?

"node-red-contrib-chatbot": {
        "name": "node-red-contrib-chatbot",
        "version": "0.19.11",
        "local": true,
        "user": false,
        "nodes": {
            "chatbot-redbot": {
                "name": "chatbot-redbot",
                "types": [],
                "enabled": false,
                "local": true,
                "user": false,
                "module": "node-red-contrib-chatbot",
                "file": "/home/demokedes/.node-red/node_modules/node-red-contrib-chatbot/nodes/chatbot-redbot.js"
            },
            "redbot-config": {
                "name": "redbot-config",
                "types": [],
                "enabled": false,
                "local": true,
                "user": false,
                "module": "node-red-contrib-chatbot",
                "file": "/home/demokedes/.node-red/node_modules/node-red-contrib-chatbot/redbot.config.js"
            },
            "chatbot-telegram-receive": {
                "name": "chatbot-telegram-receive",
                "types": [
                    "chatbot-telegram-node",
                    "chatbot-telegram-receive",
                    "chatbot-telegram-send"
                ],
                "enabled": false,
                "local": true,
                "user": false,
                "module": "node-red-contrib-chatbot",
                "file": "/home/demokedes/.node-red/node_modules/node-red-contrib-chatbot/nodes/chatbot-telegram-receive.js"
            },

Do you mean that that /home/demokedes/.node-red/node_modules/node-red-contrib-chatbot doesn't exist? I believe node-red should detect that and remove them from the file on startup.

It might be helpful in settings.js to set the log level to trace and restart node red and post the full output here.

Yes, that folder doesn't exist.
I changed log level to "trace". Output is following...but i don't believe it is useful...since nothing about chatbot....but you can see....how server is rebooting
Untitled-1.txt (329.7 KB)

I think it has got into a little weird state where you had disabled the chatbot nodes before removing them, so it is ignoring them and not tidying up its record of them.

If you really wanted to, you could hand edit .config.nodes.json and remove the chatbot section.

As for the restarts - the fact remains, something is sending PM2 a signal to shutdown. That isn't coming from Node-RED. No amount of extra trace in Node-RED will help identify what external process is stopping PM2.

As I asked before, is there a particular reason for using PM2 rather than running as a proper service?

No, no particular reason. I followed the tutorial how to install nodered on Azure VM. Pm2 was used there...

I give up....I think I will be able to restore VM to yesterday's state and hopefully get it to operational state again.
I would really like to have this chatbot node working. What do you suggest me to do? To install it thorugh shell?

Uh even after restore...server is rebooting....chatbot is not present anymore...
Will install if from the scratch...
Should I follow this or anything else?

If you are running ubuntu in the VM, then follow the RPi install instructions and use the script (with --node16)

https://nodered.org/docs/getting-started/raspberrypi

Thank you. What do you recommend me as the way option to export/backup current node red flows/nodes? Export and than import? Will it export all flows?

That is one way - so long as you chose "all flows" option on the export dialog.

alternatively, you can copy flows.json, flows_cred.json from the file system.

If you have added any contrib nodes, you will need to re-install them (or keep a copy of package.json then do an npm install after restoring that file)

Steve, thank you very much. I used the script. It upgraded it to the latest version...I can now easily use npm.
BUT, it looks like it is not meant to me, to be use chatbot node.
I tried to install it through the shell....but didn't go through. Attached is the log.
Does anyone have an idea what is the issue? Is it possible, my servers is lacking the resources (1CPU, 1 GB RAM)?
2022-02-14T15_23_45_344Z-debug-0.log (823.5 KB)

7903 error cc: internal compiler error: Killed (program cc1)

I suspect you might be right about the resources. I think that may be an out of memory error, though I haven't been able to find anything to confirm that.

@demokedes - Could it be because you are using node.js v14 ?
The chatbox uses sqlite3 which may not be compatible with node version >= 14
See Support for Node.js 14.x Ā· Issue #1314 Ā· mapbox/node-sqlite3 Ā· GitHub

Also see Node Red installation fails Ā· Issue #493 Ā· guidone/node-red-contrib-chatbot Ā· GitHub

I don't get it. After resize of VM to 4 vCPU&4GB RAM, insatallation went through, but still dons see chatbot module as installed. Any idea?
This is the ouput if the installation (for the second time)

demokedes@NodeRed:~/.node-red$ npm install node-red-contrib-chatbot
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated sequelize@5.22.5: Please update to v6 or higher! A migration guide can be found here: https://sequelize.org/v6/manual/upgrade-to-v6.html

added 1091 packages, removed 10 packages, changed 4 packages, and audited 2151 packages in 2m

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

75 vulnerabilities (40 moderate, 32 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

Paul, if that is the issue and I downgrade to Node.js 13, will I loose any other functionality?

You get those messages for disabled modules/nodes (from the palette manager). I thought it was deliberate :grinning:

0|Node-RED  | BAIL ON node-red-contrib-jktesting/jktest
0|Node-RED  | BAIL ON node-red-contrib-jktesting/jktest2
0|Node-RED  | BAIL ON node-red-contrib-jktesting/jktest3
0|Node-RED  | BAIL ON node-red-contrib-jktesting/jktestEditableList
0|Node-RED  | BAIL ON node-red-contrib-jktesting/jktest-server

What architecture are you using in Azure? If you are using an Azure web app, you need to do it differently. However, I think you've indicated you are using a full PaaS VM? In that case, what OS are you using?

If you use Debian, you can use Dave's install script which should set things up and Node-RED will run from systemd. Alternatively, if you want to take full control of things, you may want to look at my alternate installer which isn't a full solution but suggests an approach and gives you a suggested example systemd script that you can adjust for your own use.

Either way, if you are exposing Node-RED to a large audience, you should also put in place a reverse proxy as a front-end. This will be a lot more efficient and lets you offload any security processing from Node-RED to the proxy.