Skip to content

Node doesn't exit after closing watch #434

@EzraM

Description

@EzraM

After setting up, then closing, a watcher, the Node process doesn't exit.
Windows.

const chokidar = require('chokidar')
const options = {}
const directoryPath = srcPath
// configuration taken from webpack
const watcher = chokidar.watch(directoryPath, {
    ignoreInitial: true,
    persistent: true,
    followSymlinks: false,
    depth: 0,
    atomic: false,
    alwaysStat: true,
    ignorePermissionErrors: true,
    usePolling: options.poll ? true : undefined,
    interval: typeof options.poll === "number" ? options.poll : undefined
});
watcher.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions