# Deploy Event not fired

**URL:** <https://discourse.nodered.org/t/deploy-event-not-fired/58728>\
**Category:** Core Development\
**Tags:** node-red-contrib-events\
**Created:** [21 February 2022 05:17 UTC](https://discourse.nodered.org/t/deploy-event-not-fired/58728 "2022-02-21T05:17:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![okm](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@okm](https://discourse.nodered.org/u/okm)\
**Post date:** [21 February 2022 05:17 UTC](https://discourse.nodered.org/t/deploy-event-not-fired/58728/1 "2022-02-21T05:17:05Z")

</div>

Hello,

I want to take some after-deployment action. So the deploy event described here [RED.events : Node-RED](https://nodered.org/docs/api/ui/events/) is the one I want to use.  
But somehow the event is not fired / I am not able to catch it.

I use Node Red 2.2.2 inside a NodeJS App.  
If I use  
RED.events.on('deploy', (params: RuntimeDeployEvent) =\>  
this.logger.warn('deploy', params),  
);  
the logger will never be called. Although the flows-event are not triggered / caught.

on the other hand  
RED.events.on('runtime-event', (params: RuntimeDeployEvent) =\>  
this.logger.warn('runtime-event',params),  
);  
works well.

Any idea why the deploy event is not working as documented?

Thank's for your help  
okm

---

<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:** [21 February 2022 08:32 UTC](https://discourse.nodered.org/t/deploy-event-not-fired/58728/2 "2022-02-21T08:32:19Z")

</div>

The events you link to are editor events, not runtime events.

We have not published any public events in the runtime. Anything you use is internal and could theoretically change.

Having some runtime events around the deploy lifecycle is something I'm looking at for 3.0

---

<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:** [21 February 2022 10:05 UTC](https://discourse.nodered.org/t/deploy-event-not-fired/58728/3 "2022-02-21T10:05:23Z")

</div>

Hi Nick,

One thing that I would find really useful if you are looking in that area would be to have a before/after or diff of the `config` parameter.

In other words, some way for the function in the registerType function to be able to know what has changed pre- to post-deployment.

If there were a way to differentiate between node-red startup, initial deployment of a node and a redeployment of a node, that would also be very helpful.

---

<div class="post-metadata">

**Author:** ![okm](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@okm](https://discourse.nodered.org/u/okm)\
**Post date:** [21 February 2022 10:31 UTC](https://discourse.nodered.org/t/deploy-event-not-fired/58728/4 "2022-02-21T10:31:01Z")

</div>

Ok, got it.  
I agree with @TotallyInformation, in the end I use it for a "what has changed logic"

@knolleary Thank you. Looking forward to 3.0.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 April 2022 10:31 UTC](https://discourse.nodered.org/t/deploy-event-not-fired/58728/5 "2022-04-22T10:31:51Z")

</div>

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