# Installation/update problems due to WARN deprecated?

**URL:** <https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241>\
**Category:** Developing Nodes\
**Created:** [12 February 2022 21:24 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241 "2022-02-12T21:24:31Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [12 February 2022 21:24 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/1 "2022-02-12T21:24:31Z")

</div>

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  
see also

> <https://github.com/windkh/node-red-contrib-telegrambot/issues/235>
>
> I was running th telegram bot for a lot of time. Today i trying to install the u…pdate. 
> The install remove the existing version but is unable install the new version. 
> Install log:
> 2022-02-11T22:25:15.246Z installieren : node-red-contrib-telegrambot 11.2.3
> 
> 2022-02-11T22:25:15.273Z npm install --no-package-lock --global-style --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-telegrambot@11.2.3
> 2022-02-11T22:25:24.479Z \[out\] 
> 2022-02-11T22:25:24.479Z \[out\] up to date in 8s
> 2022-02-11T22:25:24.575Z rc=0
> 
> I running node-red as redmatic inside a RaspberryMatic on Raspi3
> 
> Would be nice when i can get the old version to get it working again if the new version not running on my environment.
> 
> Greetings

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)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [12 February 2022 21:49 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/2 "2022-02-12T21:49:38Z")

</div>

I don't see any errors in the install shown there.

What exactly is the problem being seen?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [12 February 2022 21:56 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/3 "2022-02-12T21:56:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [12 February 2022 22:51 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/4 "2022-02-12T22:51:37Z")

</div>

To be honest, I just took the values that were printed by node-red-dev…

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 February 2022 23:46 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/5 "2022-02-12T23:46:04Z")

</div>

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.

```auto
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 node-red-contrib-telegrambot@11.2.3
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 har-validator@5.1.5: 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 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
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 uuid@3.4.0: 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 request@2.88.2: 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] 
2022-02-12T23:42:55.050Z [out] added 96 packages in 15s
2022-02-12T23:42:55.099Z rc=0

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 February 2022 10:51 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/6 "2022-02-13T10:51:33Z")

</div>

> [@windkh](#):
>
> To be honest, I just took the values that were printed by node-red-dev

What did it say that suggested you changed the version of nodejs required?

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [13 February 2022 16:27 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/7 "2022-02-13T16:27:57Z")

</div>

node-red-dev validate said that it is compatible to node-red v1.3.7 and nodejs 12.0.0

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/f/6f3e2a640de012a6679162c31d030ba996bb8285.png)

for that reason I added the following entries to package.json

```auto
"node-red": {
		"version": ">=1.3.7",

```

and

```auto
"engines": {
		"node": ">=12.0.0"
    }

```

BTW I have the following versions running:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/250ed13a77d54945bd13da75d47ea37c7520fbe9.png)

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [13 February 2022 16:39 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/8 "2022-02-13T16:39:55Z")

</div>

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](https://github.com/yagop/node-telegram-bot-api/issues/855)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 February 2022 16:46 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/9 "2022-02-13T16:46:05Z")

</div>

> [@windkh](#):
>
> node-red-dev validate said that it is compatible to node-red v1.3.7 and nodejs 12.0.0

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.

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [13 February 2022 16:50 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/10 "2022-02-13T16:50:45Z")

</div>

well, I will remove the version info completely from package.json ... at least for a while

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [13 February 2022 17:09 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/11 "2022-02-13T17:09:36Z")

</div>

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 ????

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [23 February 2022 20:04 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/12 "2022-02-23T20:04:05Z")

</div>

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

"node-red": {  
"version": "\>=0.1.0",  
"nodes": {  
...  
}  
},  
"engines": {  
"node": "\>=7.6.0"  
},

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 February 2022 09:34 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/13 "2022-02-24T09:34:47Z")

</div>

While it does indeed "fix" the problem - it is not the recommended way to do it. Hopefully others will not copy this solution.

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [24 February 2022 11:47 UTC](https://discourse.nodered.org/t/installation-update-problems-due-to-warn-deprecated/58241/14 "2022-02-24T11:47:22Z")

</div>

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.
