Upgrade to Node-Red 3, now getting an error message in flows

Hi, I have upgraded Node-Red and now getting errors in my old existing flow when deploying. The nodes that have an issue are ones where I take the input message, do something with it, then output a new output message unrelated to the original, for example writing something to an SQL database

msg1 = {};
msg1.topic = "UPDATE ....... something ....... msg.payload";
return msg1;

I am getting the following error on the first msg1={} line.
Property 'topic' is missing in type '{}' but required in type 'type of msg1'.

I have an option to ignore the error or disable checking for the file (ie node) which puts //@ts-nocheck in the header, but I dont want to do this to every single node......

I only get the error when I try to modify the nodes and redeploy. Any ideas? Thanks!

Try
const msg1 = {}
You need to declare new vars. The Monaco editor in V3 shows more errors than Ace did.

1 Like

That works, thankyou!

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