Custom node not working after full deploy

Hi all,

I just started working on creating my own nodes in node-red.
I created my own implementation of the http-in node.

The node I created listens to a post request coming from a client.
In my callback I use the method this.send(message).

Whenever I start node-red from my powershell console everything works perfect.
The post request arrives in my node and I see the logging in de debug console:
image

Whenever I change something in my flow (say I add an extra node) and click on deploy my node stops working.

The request will still arrive in my custom node and the callback of this node. By putting some basic logging inside my code I could follow it all the way to the this.send(message)
The problem is that my flow never arrives in the debug node.

To make it work I have to stop node-red in the powershell console and start it again.

I've messed around with the deploy of only modified flows and modified nodes and these seem to be working fine. (my request would keep arriving in the debug node). Only a full deploy breaks my node.

Things I have tried to fix it

  • put the this.send inside this.on("input") and call the this.receive instead .
  • put logging on trace to see if there is extra information available (there wasn't)

Is there anything a full deploy does that could break my node or did I miss anything?

I am using Node.js v12.18.4. and Node-RED version: v1.1.3

Thanks in advance!

Hey @GvB. Not quite apparent what is the reason, can you post the code snippets ?

Hi @Kib,

I've written my code in typescript which gets compiled to javascript.
The files are quite big so i've uploaded them as 2 txt files.

GvB

javascript.txt (10.3 KB) typescript.txt (7.5 KB)

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