# Monaco editor error question

**URL:** <https://discourse.nodered.org/t/monaco-editor-error-question/48866>\
**Category:** General\
**Created:** [25 July 2021 02:00 UTC](https://discourse.nodered.org/t/monaco-editor-error-question/48866 "2021-07-25T02:00:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shel](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shel](https://discourse.nodered.org/u/shel)\
**Post date:** [25 July 2021 02:00 UTC](https://discourse.nodered.org/t/monaco-editor-error-question/48866/1 "2021-07-25T02:00:41Z")

</div>

I have a function that has code

```auto
let z = msg.humidity

msghumidity = {
    payload: 'RH% ' + z,
}
let w = msg.payload;
w = Number(w);
let f = (w * 1.8) + 32;
let num = f;
let n = num.toFixed(2);
msgtempf = {
    payload: 'Deg F ' + n,
}
msgtempc = {
    payload: 'Deg C ' + w,
}

```

It is not a big deal but is there a way to get rid of the red underlines? It's not really an error.  
Thanks

[EDIT] it shows up when I typed the question but not when I posted but the msg.humidity and msghumidity have red underlines as well as a few others. Again it's not an error but appears as one.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2021 04:22 UTC](https://discourse.nodered.org/t/monaco-editor-error-question/48866/2 "2021-07-25T04:22:02Z")

</div>

Hover over the red underline, what does quick fix show when you click it?

Spoiler (click blurred text to reveal)...

clue...

You don't declare the msg objects.

E.g.

```auto
const msghumidity = {
    payload: 'RH% ' + z,
}

```

---

<div class="post-metadata">

**Author:** ![shel](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shel](https://discourse.nodered.org/u/shel)\
**Post date:** [25 July 2021 04:55 UTC](https://discourse.nodered.org/t/monaco-editor-error-question/48866/3 "2021-07-25T04:55:02Z")

</div>

wow, obviously that editor is going to force me to polish up my coding skills

Thanks muchly

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2021 05:21 UTC](https://discourse.nodered.org/t/monaco-editor-error-question/48866/4 "2021-07-25T05:21:20Z")

</div>

> [@shel](#):
>
> that editor is going to force me to polish up my coding skills

Lol

The reason I didnt disable that error in the node-red core was because of the benefits it gives you - like highlighting undefined values and mis-typed variable names.

See this post: [Using Monaco editor - monaco branch now in fork (PR#2971) - #98 by Steve-Mcl](https://discourse.nodered.org/t/using-monaco-editor-monaco-branch-now-in-fork-pr-2971/26561/98) (click the reveal)

---

<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:** [8 August 2021 05:21 UTC](https://discourse.nodered.org/t/monaco-editor-error-question/48866/5 "2021-08-08T05:21:55Z")

</div>

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