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

Consistently getting ENOSPC errors when using live-reloading #529

Open
ebolyen opened this issue Feb 5, 2025 · 2 comments
Open

Consistently getting ENOSPC errors when using live-reloading #529

ebolyen opened this issue Feb 5, 2025 · 2 comments

Comments

@ebolyen
Copy link

ebolyen commented Feb 5, 2025

I'm following the instructions in the README, and some of the time, there's no issue, but if I change enough subpackages I end up hitting my limit on watched files.

It looks like node_modules isn't exempted from chokidar's file watcher. So I tend to get a lot of these:

@myst-theme/book:dev: [1] Error: ENOSPC: System limit for number of file watchers reached, watch '/home/evan/consulting/qiime2/myst-theme/packages/frontmatter/node_modules/@scienceicons/react/24/solid/esm/package.json'
@myst-theme/book:dev: [1]     at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
@myst-theme/book:dev: [1]     at Object.watch (node:fs:2471:36)
@myst-theme/book:dev: [1]     at createFsWatchInstance (/home/evan/consulting/qiime2/myst-theme/node_modules/chokidar/lib/nodefs-handler.js:119:15)
@myst-theme/book:dev: [1]     at setFsWatchListener (/home/evan/consulting/qiime2/myst-theme/node_modules/chokidar/lib/nodefs-handler.js:166:15)
@myst-theme/book:dev: [1]     at NodeFsHandler._watchWithNodeFs (/home/evan/consulting/qiime2/myst-theme/node_modules/chokidar/lib/nodefs-handler.js:331:14)
@myst-theme/book:dev: [1]     at NodeFsHandler._handleFile (/home/evan/consulting/qiime2/myst-theme/node_modules/chokidar/lib/nodefs-handler.js:395:23)
@myst-theme/book:dev: [1]     at NodeFsHandler._addToNodeFs (/home/evan/consulting/qiime2/myst-theme/node_modules/chokidar/lib/nodefs-handler.js:637:21) {
@myst-theme/book:dev: [1]   errno: -28,
@myst-theme/book:dev: [1]   syscall: 'watch',
@myst-theme/book:dev: [1]   code: 'ENOSPC',
@myst-theme/book:dev: [1]   path: '/home/evan/consulting/qiime2/myst-theme/packages/frontmatter/node_modules/@scienceicons/react/24/solid/esm/package.json',
@myst-theme/book:dev: [1]   filename: '/home/evan/consulting/qiime2/myst-theme/packages/frontmatter/node_modules/@scienceicons/react/24/solid/esm/package.json'

I could update my limits, but I don't think there's any point to observing node_modules is there? In the event you updated package versions, I don't think doing a fresh rebuild is that onerous.

@ebolyen
Copy link
Author

ebolyen commented Feb 5, 2025

I've been muddling through by just restarting and doing fresh builds until I magically avoid the issue.

@rowanc1
Copy link
Member

rowanc1 commented Feb 5, 2025

I haven't ever come across this error before. 🤔

You can also go into the packages that you need to watch individually and dev/build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants