Closed ryanb closed 1 month ago
Please report this issue to Chokidar—we have very limited control over precisely how it works. In the meantime, you can force the dependency back to the 3.x line.
@nex3 sounds like they won't be able to easily fix it in chokidar. Is it possible to separate watch path and load paths in sass? I only need node_modules
in the load path, not watch the entire directory.
Generic load paths are too often used for user source code to omit them from watching. I recommend using --pkg-importer=node
to load package dependencies; that won't be covered by the watcher.
Switching to --pkg-importer=node
worked great. I just needed to prefix all package import paths with pkg:
. Thanks!
Update: I just saw this comment about moving from chokidar: https://github.com/sass/dart-sass/issues/2373#issuecomment-2411793489
So this may also be why I'm no longer seeing this issue.
Since upgrading Sass to v1.79.2, the
sass ... --watch
command crashes after a few minutes with the following error.When I run that command and list out which processes are using files with
lsof | awk '{print $1}' | sort | uniq -c | sort -rn
it showsnode
has 39,520 files open.It may be because I have
--load-path=node_modules
, however this wasn't an issue with sass v1.78.0. When I downgrade back the number of open files fornode
stays around ~160.It seems Sass v1.79 upgraded chokidar from v3.6 to v4.0 which I assume is causing this issue.
I'm on Mac OS X 14.6.1