> It was using fs.readFile without waiting for a callback.
This is why I always use fs.readFileSync or correctly implement the callback and read it sequentially myself as it feeds me chunks of the file data buffer via the callback.
You can also use TypeScript and await on the promise which is super clean, highly recommend it.
All in all, node's file system libs are pretty solid.