# Node-red V3 - node.warn is not working, function node not working?

**URL:** <https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633>\
**Category:** General\
**Created:** [23 February 2023 13:09 UTC](https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633 "2023-02-23T13:09:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bs-eng](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bs-eng/32/51470_2.png) [@bs-eng](https://discourse.nodered.org/u/bs-eng)\
**Post date:** [23 February 2023 13:09 UTC](https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633/1 "2023-02-23T13:09:03Z")

</div>

Hi there!  
I installed yesterday on a fresh Debian 11 node-red V3.  
After setting up some new flows I am noticing that function nodes seem not to work for me. E.g. node.warn() produces no output. A code line like msg.payload = "haha"; does not change the msg output from that function node....

What can cause such issues?

The installer I used is this one: [https://github.com/node-red/linux-installers](https://github.com/node-red/linux-installers)

Thanks for any pointers!  
Cheers  
JR

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [23 February 2023 13:18 UTC](https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633/2 "2023-02-23T13:18:49Z")

</div>

Hi @bs-eng

Forgive what may be an obvious question, but you are definitely deploying the changes you made to the node after each edit? It isn't enough to just close the edit dialog, you have to click the deploy button in the top right of the editor.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 February 2023 13:28 UTC](https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633/3 "2023-02-23T13:28:17Z")

</div>

Can you export and paste here a simple flow consisting of an Inject node, a function node and a debug node demonstrating the two problems please?

---

<div class="post-metadata">

**Author:** ![bs-eng](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bs-eng/32/51470_2.png) [@bs-eng](https://discourse.nodered.org/u/bs-eng)\
**Post date:** [23 February 2023 14:17 UTC](https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633/4 "2023-02-23T14:17:22Z")

</div>

no worries about silly questions:

- yes, the flow is being deployed completely.
- a sample flow I am currently using is this:

```auto
[
    {
        "id": "b0285e4ba29bbba5",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "4702a9d0940d57a7",
        "type": "ui_form",
        "z": "b0285e4ba29bbba5",
        "name": "",
        "label": "",
        "group": "480d904da74a968f",
        "order": 1,
        "width": 0,
        "height": 0,
        "options": [
            {
                "label": "AUS",
                "value": "AUS",
                "type": "number",
                "required": true,
                "rows": null
            },
            {
                "label": "50°C",
                "value": "T50",
                "type": "number",
                "required": false,
                "rows": null
            },
            {
                "label": "90°C",
                "value": "T90",
                "type": "number",
                "required": false,
                "rows": null
            },
            {
                "label": "100°C",
                "value": "T100",
                "type": "number",
                "required": false,
                "rows": null
            },
            {
                "label": "150°C",
                "value": "T150",
                "type": "number",
                "required": false,
                "rows": null
            },
            {
                "label": "200°C",
                "value": "T200",
                "type": "number",
                "required": false,
                "rows": null
            },
            {
                "label": "250°C",
                "value": "T250",
                "type": "number",
                "required": false,
                "rows": null
            }
        ],
        "formValue": {
            "AUS": "",
            "T50": "",
            "T90": "",
            "T100": "",
            "T150": "",
            "T200": "",
            "T250": ""
        },
        "payload": "",
        "submit": "submit",
        "cancel": "cancel",
        "topic": "topic",
        "topicType": "msg",
        "splitLayout": "",
        "className": "",
        "x": 470,
        "y": 200,
        "wires": [
            [
                "51f47c499c06da51",
                "be8805b49421213c"
            ]
        ]
    },
    {
        "id": "51f47c499c06da51",
        "type": "debug",
        "z": "b0285e4ba29bbba5",
        "name": "debug 266",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 910,
        "y": 200,
        "wires": []
    },
    {
        "id": "0ca96fb20ee030d7",
        "type": "inject",
        "z": "b0285e4ba29bbba5",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"AUS\":0,\"T50\":45,\"T90\":null,\"T100\":95,\"T150\":null,\"T180\":null,\"T200\":null,\"T250\":null,\"T270\":null}",
        "payloadType": "json",
        "x": 330,
        "y": 200,
        "wires": [
            [
                "4702a9d0940d57a7",
                "17debf73338ff8bd"
            ]
        ]
    },
    {
        "id": "17debf73338ff8bd",
        "type": "debug",
        "z": "b0285e4ba29bbba5",
        "name": "debug 263",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 490,
        "y": 240,
        "wires": []
    },
    {
        "id": "152c8ccda00f41b3",
        "type": "function",
        "z": "b0285e4ba29bbba5",
        "name": "calc",
        "func": "msg.payload = \"haha\";\nnode.warn(\"my warning\");\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 670,
        "y": 200,
        "wires": [
            []
        ]
    },
    {
        "id": "be8805b49421213c",
        "type": "debug",
        "z": "b0285e4ba29bbba5",
        "name": "debug 264",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 690,
        "y": 240,
        "wires": []
    },
    {
        "id": "480d904da74a968f",
        "type": "ui_group",
        "name": "Winkelmesser",
        "tab": "4585cd3260b0875d",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "4585cd3260b0875d",
        "type": "ui_tab",
        "name": "Retro-S",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

---

<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:** [23 February 2023 14:20 UTC](https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633/5 "2023-02-23T14:20:05Z")

</div>

Your function node is not connected to the wire, try moving it.

> [@bs-eng](#):
>
> ```auto
> "x": 670,
> "y": 200,
> "wires": [
> []
> ]
> },
> {
> 
> ```

nothing in the wires array

---

<div class="post-metadata">

**Author:** ![bs-eng](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bs-eng/32/51470_2.png) [@bs-eng](https://discourse.nodered.org/u/bs-eng)\
**Post date:** [23 February 2023 14:33 UTC](https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633/6 "2023-02-23T14:33:17Z")

</div>

OMG  
Yes, that did it.  
Thanks for looking into it!

---

<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:** [9 March 2023 14:33 UTC](https://discourse.nodered.org/t/node-red-v3-node-warn-is-not-working-function-node-not-working/75633/7 "2023-03-09T14:33:47Z")

</div>

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