Closed codeimpossible closed 2 years ago
I am having a similar issue using node v0.12.13. "graceful-fs" is one of the dependencies of "readdirp" package and its breaking the functionality. It was working fine with 4.2.6
This prevents builds with good old Gitbook Legacy on Node 6.9.x. gitbook-cli downloads gitbook 2.6.9 -> fstream-ignore 1.0.2 -> fstream 1.0.12 -> graceful-fs 4.2.8 = no gitbook is created anymore. Manually changing the version to 4.2.6 solves the problem.
Also experiencing this issue. Works as expected with v4.2.6
Run into similar issue with readdir
when using module fs-extra
(which internally depends on graceful-fs
). As I far as I can track down the logic, the callback passed to readdir
isn't called somehow.
And I can confirm that graceful-fs@4.2.6
works.
Environment: OS: macOS BigSur Node: 0.10.48
@isaacs just wondering if you've had a chance to look this over?
Wow, running node 6 on a new mac is a huge pita. 😅
I think this works now, please try with npm install isaacs/node-graceful-fs
and if it fixes the issue, I'll publish to npm.
When using graceful-fs v4.2.7+
fs.readdir()
throws an exception on node < 6.This is due to
options
being passed consistently in v4.2.7+ rather than before when it was only passed if it wasn't a function.options
was added as part of fs.readdir() in node 6.0.0.See code before the change vs code after the change.
Could v4.2.7 and v4.2.8 be rolled back and shipped as breaking changes (v5.0.0) instead to prevent issues on older builds? Also, dropping node < 6 as a supported engine would be a good way to enforce any dependency on newer api signatures.