h5p / h5p-cli

Command Line Interface
MIT License
64 stars 33 forks source link

Exclude node_modules from livereload #86

Closed otacke closed 5 months ago

otacke commented 5 months ago

When merged in, will not watch node_modules folders for live reload (in a configurable fashion).

Just encountered:

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

Error: ENOSPC: System limit for number of file watchers reached, watch [...]

when running h5p server - if you have many dependencies in a package, the number of files to watch can explode (in node_modules). Same if you just work on multiple libraries at the same time each contributing a node_modules folder.

Solved by adding a configuration item (just in case someone wants node_modules to be watched) and passing that as the exclusion property to livereload's createServer function. .git would also be a candidate, but that's covered by default already.