Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use graceful-fs instead of fs #572

Closed
steelbrain opened this issue Jan 27, 2017 · 6 comments
Closed

Use graceful-fs instead of fs #572

steelbrain opened this issue Jan 27, 2017 · 6 comments

Comments

@steelbrain
Copy link

The latest release uses fs.watch from fs instead of the graceful-fs module, which in turn results in this in our app

@steelbrain
Copy link
Author

Blocked on isaacs/node-graceful-fs#106

@paulmillr
Copy link
Owner

we're not going to switch to graceful. It's up to user.

@steelbrain
Copy link
Author

@paulmillr I am not really sure how a user could switch to graceful inside of a module that has hardcoded references to the native fs.watch. Could you please elaborate on that?

@paulmillr
Copy link
Owner

var realFs = require('fs')
var gracefulFs = require('graceful-fs')
gracefulFs.gracefulify(realFs)
require('chokidar')

@steelbrain
Copy link
Author

That is not an idea solution but could work. Thanks @paulmillr

@wmertens
Copy link

@paulmillr monkey-patching fs is not that great - would you accept a PR that lets the user provide an optional fs module, stored on the FSWatcher class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants