I'm getting the following error when including an emoji in the filename for the write-file node:
failed to write to file: Error: ENOENT: no such file or directory, open
I've only seen this in Node-RED 3.10 on Windows 11 with NodeJS 20.
When I go back to NodeJS 18 or 16, there's no such problem. I also don't see the problem with the Node-RED Docker container, but that one is using NodeJS 16. Would be nice if someone could check this with NodeJS 20 on a Linux system.
Here's a simple sample flow to demonstrate the issue:
[
{
"id": "cc10a716472a843a",
"type": "inject",
"z": "454622bdf78b0ca1",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 60,
"wires": [
[
"24674f9a0ae35479"
]
]
},
{
"id": "1782c517158a3408",
"type": "debug",
"z": "454622bdf78b0ca1",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 580,
"y": 60,
"wires": []
},
{
"id": "24674f9a0ae35479",
"type": "file",
"z": "454622bdf78b0ca1",
"name": "",
"filename": "/data/test/test-okay-👌.txt",
"filenameType": "str",
"appendNewline": true,
"createDir": true,
"overwriteFile": "true",
"encoding": "none",
"x": 370,
"y": 60,
"wires": [
[
"1782c517158a3408"
]
]
}
]