Everything else seems to be async, but this is sync and doesn't have error handling so it can result in a crash like this:
Error: ENOENT: no such file or directory, stat '/Users/drudge/XXXXXX'
at Error (native)
at Object.fs.statSync (fs.js:892:18)
at Object.files (/Users/drudge/XXXX/node_modules/node-dir/lib/paths.js:66:12)
Hello,
Is there a reason that you are using
statSync
on line 66 of paths.js? https://github.com/fshost/node-dir/blob/master/lib/paths.js#L66Everything else seems to be async, but this is sync and doesn't have error handling so it can result in a crash like this: