Hi tomall professionals
some people complain that updating is not possible anylonger.
I just added two things in package.json to meet all scoreboard requirements … after that release people started reporting issues
I wonder why the installation suddenly fails due to a warning which is treated like an error. Any ideas? (Btw, the warning is there for ages without causing any problems)
I don't see any errors in the install shown there.
What exactly is the problem being seen?
I see that you have added node >= 12 in engines. Do you mean that it will not run with nodejs 10 any more? What does this mean for anyone using 10 who tries to update your node?
To be honest, I just took the values that were printed by node-red-dev…
The problem appears to be caused by redmatic, not by Node-RED.
You do need to see if you can't update some of those outdated dependencies though if you can.
2022-02-12T23:42:38.158Z Install : node-red-contrib-telegrambot 11.2.3
2022-02-12T23:42:38.195Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict firstname.lastname@example.org
2022-02-12T23:42:52.101Z [err] e[37;40mnpme[0m
2022-02-12T23:42:52.102Z [err] e[0me[30;43mWARNe[0m e[0me[35mdeprecatede[0m email@example.com: this library is no longer supported
2022-02-12T23:42:52.102Z [err] e[0m
2022-02-12T23:42:52.239Z [err] e[37;40mnpme[0m
2022-02-12T23:42:52.240Z [err] e[0me[30;43mWARNe[0m e[0me[35mdeprecatede[0m firstname.lastname@example.org: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
2022-02-12T23:42:52.240Z [err] e[0m
2022-02-12T23:42:52.343Z [err] e[37;40mnpme[0m
2022-02-12T23:42:52.343Z [err] e[0me[30;43mWARNe[0m e[0me[35mdeprecatede[0m email@example.com: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
2022-02-12T23:42:52.343Z [err] e[0m
2022-02-12T23:42:52.349Z [err] e[37;40mnpme[0m e[0m
2022-02-12T23:42:52.350Z [err] e[30;43mWARNe[0m e[0me[35mdeprecatede[0m firstname.lastname@example.org: request has been deprecated, see https://github.com/request/request/issues/3142
2022-02-12T23:42:52.350Z [err] e[0m
2022-02-12T23:42:55.050Z [out] added 96 packages in 15s
What did it say that suggested you changed the version of nodejs required?
node-red-dev validate said that it is compatible to node-red v1.3.7 and nodejs 12.0.0
for that reason I added the following entries to package.json
BTW I have the following versions running:
About the outdated dependencies: the request module is deprecated. I can not do anything about that as it is an indirect dependency. In this special case it is node-telegram-bot-api. There is already a discussion going on about refactoring it see also Discussion: Refactor/Rewrite/Replace some parts of this library · Issue #855 · yagop/node-telegram-bot-api · GitHub
I believe that was detecting what you had previously specified (node-red at least 1.0.0 and nodejs 10.0.0 and saying that is perfectly ok. You changed those to node-red 1.3.7 and nodejs 12.0.0, which means that you have said that it is not compatible with anything less than node-red 1.3.7 or nodejs less that 10.0.0. Node red apparently checks that the version of telegrambot is compatible with itself and won't load the node if it is not compatible. That is the cause of the errors for anyone with node-red 1.3.6 or below. The solution is to revert the changes you made.
well, I will remove the version info completely from package.json ... at least for a while
Well... it is hard to define the correct version for engine and nodejs in package.json as I can not test if it would run on old systems. Is there a way to automate testing ????
Thanks to all here who contributed ideas to the problem and participated in the discussion of the linked github issue. I appreciate that!
For me the problem is solved at this point...
I simply added very low version numbers to be as compatible as possible to old node-red installations
While it does indeed "fix" the problem - it is not the recommended way to do it. Hopefully others will not copy this solution.
I know what you mean. I think that it is correct for the telegrambot nodes as they were developed long ago and are still in use on outdated platforms. However I can not test it to be a 100% sure about it.
I agree… this is not a solution that is recommended for all other nodes as this approach would possibly make the idea of having version checks useless.