Telegram got nuked

Telegram bot got nuked.
I have had NR working in docker on a rpi for years, it runs my home automation and until today has been flawless. Went to do updates today - there were no updates to NR, but there were a few node updates. One of them was node-red-contrib-telegrambot. The update failed in the worst way. Instead of just returning to last functioning state, the nodes just disappeared leaving me with a broken NR. I tried installing them using a container shell prompt and got the failures below. I managed to get an old version (14.2.0) installed removing new docker images and using the shell/npm install method. Any ideas what's going on?

Current (working) versions:
Node RED v3.0.2
Node.js v10.23.0

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 notsup Unsupported engine for node-red-contrib-telegrambot@15.1.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.23.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: node-red-contrib-telegrambot@15.1.0

Thanks,

Jon

Node version needs updating: Supported Node versions : Node-RED

They shouldn't "disappear" - the worst that should happen is that they are shown with red dashed outline indicating that Node-RED doesn't know them. That would be because the module couldn't be loaded as indicated by Steve.

Updating your version of Node.js and doing an npm rebuild in the userDir folder should sort it all out.

The nature of node.js based applications means that you do need to keep on top of changes to node.js and maintain your deployed version to one of the current LTS versions. Typically there are 3 overlapping LTS versions which gives plenty of scope.

Yes - like I said I deleted a couple newer docker images to revert to a working config. Not sure what got things working, old NR, old nodes, or the combo. I had been using the :latest docker image, even tried 3.0.2-16 image which seemed to be the same as :latest. That should be NR 3.0.2 with Node JS 16 (recommended).

One thing I noticed is the telegram node version is 15.1.0 on Github, but 15.0.1 is what's available to install through the palette.

Jon

It likely wont be relevant however f you wait ~30 mins, 15.1.0 will be avaiable in your palette

The flows stopped working, nodes were no longer available in the palette and red boxes where nodes existed. Tried both the :latest and the 3.0.2-16 NR docker images (appeared to be the same). The only way I got things working was to purposely install node-red-contrib-telegrambot v 14.2.0 and delete the newest docker pulls to force it to use an old version. Not sure which caused things to start working but the nodes came back and started working.

I can try doing npm rebuild is that reasonable to do in a docker container?

Jon

Your docker environment needs to be kept up to date one way or another. It depends whether you created it or it was an official build. If the official build, you would need to update to the later build. Then, because it was a major node.js update (10->14), you would still need to do the rebuild. BUT, the rebuild is done in your userDir - typically the /data folder you attached to Docker - not in the container.

It would be best if you have a development environment, that all changes should be tested on before making them live.

1 Like

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