https://github.com/parshap/node-sanitize-filename https://www.npmjs.com/package/sanitize-filename https://github.com/minimaxir/big-list-of-naughty-strings https://raw.githubusercontent.com/minimaxir/big-list-of-naughty-strings/refs/heads/master/blns.json
Why this breaks
Most filesystems reject or mishandle special Unicode "noncharacters" like U+FFFE or U+FFFF.
That’s why fs.writeFile can’t even create/open the file—it’s not a valid filename on your system (likely macOS or Linux).