Skip to content

Filewatcher watches node_modules and other directories it doesn't need to #178

@Quenty

Description

@Quenty

Need to add this line to the dev.ts

chokidar
            .watch(projectDir, {
                ignored: (file) => (file.includes("node_modules") || file.includes(".git")),
                ignoreInitial: true,
            })

To have it ignore other modules that aren't needed to be watched, otherwise you can get an error like this

node:internal/fs/watchers:207
      const error = new UVException({
                    ^

Error: EMFILE: too many open files, watch
    at FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
Emitted 'error' event on FSWatcher instance at:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcli

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions