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

source-directories with big ancestor directory → file watcher error #62

Open
lue-bird opened this issue May 16, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@lue-bird
Copy link

lue-bird commented May 16, 2023

With a source-directories field containing both src and a distant unpublished library

"source-directories": [
    "src",
    "../../../some-libraries/elm-midi/src"
]

elm-watch throws the following error and terminates its process

 21:14:20 Compilation finished in 2.26 s.
-- WATCHER ERROR ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The file watcher encountered an error, which means that it cannot continue.
elm-watch is powered by its file watcher, so I have to exit at this point.

See if this is something you can solve by maybe removing some problematic files
or something!

This is the error message I got:

ENOSPC: System limit for number of file watchers reached, watch '/home/lue/Desktop/some-libraries/some-unrelated-library/.git/objects/87/05073607de7d25a6bcadb660cf7e1b8bfdd447'

My uneducated guess is that this function:

const watchRoot = longestCommonAncestorPath(paths);

watches all the library files and many more within the parent directory of some-libraries and this app's instead of only the relevant ones from only the specified directories.

Current workaround is moving the unpublished library code to the app's directory.

Anyway, much, much love for building elm-watch! 🌈⃤🦋

@lydell
Copy link
Owner

lydell commented May 16, 2023

What an excellent bug report! Thank you! 💙

@lydell lydell added the bug Something isn't working label May 16, 2023
@lydell
Copy link
Owner

lydell commented Oct 14, 2023

ℹ️ This should be fixed in the beta version (npm install elm-watch@beta), but I haven’t tested it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants