I have a scenario where I have a bunch of custom nodes that I created that leverage a configuration node. I built the configuration node to run against the @elasticsearch/elasticsearch nodejs client lib. It has worked great on previous systems we have mostly running nodejs 12, node-red <2.0, etc.
Now I have just stood up a system which has nodejs 14, node-red 2 and I notice that every single time there is a flow that contains a node that references this particular config server, I can't save nodes.....it looks like on close something is happening where the same source code as before is throwing exceptions out of the @node-red/runtime/lib/nodes/Node.js file @ log_helper per below:
The Configuration Server is very basic in that it is simply creates a client from properties it collects from the form and adds to this per below, I don't have a node.on method in it but it seems that the close always happens across all my es nodes when they wire to the actual config node.
function ElasticsearchServerNode(n) {
this.id = n.id;
this.host = n.host;
this.name = n.name;
this.apikey = n.apikey;
this.client = qs.api.getClient(this.url, this.apikey);
}
RED.nodes.registerType("elasticsearch-node", ElasticsearchServerNode);
And this has worked without change for quite a while. Another thing I will mention is this doesn't happen when a configuration node is not in play....for all other nodes, etc it seems that it will save close/spin back up fine. Additionally the biggest way I see this occurring is when I click deploy, or Ctl+C out of node red running in the foreground... if I deploy then the node actually saves but I immediately get the following on the UI
If I attempt to deploy again it asks for a Merge a few times, and then at one point seems to take it. However if I attempt to run the flow after this I get
Any advice/assistance is greatly appreciated!
Justin