vercel/pkg

Snapshot file system incompatible with fs.promises API

ddorsett opened this issue · 4 comments

Switched from "classic" fs.readFile (or promisified version) to fs.promises and fs.promises.readFile() fails to find a file with ENOENT.
The file is definitely there, changing back to promisified fs.readFile() works fine.

Node 12.16.1, pkg 4.4.9

@igorklopov There should be a warning on the front-side README.md that the fs.promises API is not (yet?) supported. Is there a plan/roadmap when it will be implemented?

Same with me. Super annoying that there's no proper warning what and while - especially when you package a third-side module (like jsdom) and you don't control the source.

I patched this on my fork at https://github.com/leafac/pkg

It’s available at npm install @leafac/pkg.

If the maintainers are interested in a pull request, I’d be happy to send it.

Merged!