If I use chokidar to index a small unix file system in a docker container, the ready event isn't fired. Instead, I get multiple instances of the raw event. What does this event mean?
FWIW, I have ignorePermissionErrors set to true.
The raw event is a pass-through of the events emitted by the underlying watch mechanisms chokidar uses. If you were to use node's fs.watch() directly, that's what it would be emitting.
It is not related to the ready event. Never receiving a ready event is a bug, and there are a couple existing issues discussing circumstances that cause that to happen.
I see, thanks.
Incidentally, I can't seem to find any documentation on a "raw" event emitted by fs.watch(), do you know of any?
The first argument passed with the raw event from chokidar is the name of the event as it was passed from fs.watch() (or fsevents or fs.watchFile() depending on the watch mode chokidar is in).
raw is intended more for debugging purposes than for relying upon in regular software usage
Usage example from the readme:
watcher.on('raw', (event, path, details) => {
log('Raw event info:', event, path, details);
});
details does not have a fixed object structure since it depends on what gets passed along from the various watch modes.
Awesome. Thanks.
Most helpful comment
The first argument passed with the
rawevent from chokidar is the name of the event as it was passed fromfs.watch()(orfseventsorfs.watchFile()depending on the watch mode chokidar is in).rawis intended more for debugging purposes than for relying upon in regular software usageUsage example from the readme:
detailsdoes not have a fixed object structure since it depends on what gets passed along from the various watch modes.