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

**URL:** <https://discourse.nodered.org/t/upgrade-to-node-red-3-now-getting-an-error-message-in-flows/77726>\
**Category:** General\
**Created:** [20 April 2023 06:48 UTC](https://discourse.nodered.org/t/upgrade-to-node-red-3-now-getting-an-error-message-in-flows/77726 "2023-04-20T06:48:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_cave\_dweller](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dr\_cave\_dweller](https://discourse.nodered.org/u/dr_cave_dweller)\
**Post date:** [20 April 2023 06:48 UTC](https://discourse.nodered.org/t/upgrade-to-node-red-3-now-getting-an-error-message-in-flows/77726/1 "2023-04-20T06:48:35Z")

</div>

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

```auto
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!

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 April 2023 06:53 UTC](https://discourse.nodered.org/t/upgrade-to-node-red-3-now-getting-an-error-message-in-flows/77726/2 "2023-04-20T06:53:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dr\_cave\_dweller](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dr\_cave\_dweller](https://discourse.nodered.org/u/dr_cave_dweller)\
**Post date:** [20 April 2023 10:13 UTC](https://discourse.nodered.org/t/upgrade-to-node-red-3-now-getting-an-error-message-in-flows/77726/3 "2023-04-20T10:13:40Z")

</div>

That works, thankyou!

---

<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:** [19 June 2023 10:14 UTC](https://discourse.nodered.org/t/upgrade-to-node-red-3-now-getting-an-error-message-in-flows/77726/4 "2023-06-19T10:14:18Z")

</div>

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