If you are facing the "ENOENT, no such file or directory" error message when using fs.createWriteStream, check your file name again.
In my case, the last character is not the last character of file name, but carrage return (\r)
I lost 3 hours to find this simple answer. So I leave this memo.
Add gist on how to properly handle
ENOENT
and other error when usingcreateWriteStream
https://gist.github.com/minons1/fe8cd5f45541c0dbdfa00a74555c8980