I've worked with laravel5 and 6 for years but decided to start a new small site on Laravel 9 using sail and suprisingly haven't had many issues until now.
I started working on a dashboard and making small changes, all of which have shown except for some style class tags for tailwind. I used 'sail down' to pull everything down and run 'sudo npm run dev' to see if that would fix it. Unfortunately that brought about this error:
sudo npm run dev
> [email protected] dev
> vite
node:internal/errors:491
ErrorCaptureStackTrace(err);
^
Error: EMFILE: too many open files, watch '/home/user/mount/Websites/test/app/View/Components'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2315:34)
at createFsWatchInstance (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:48596:17)
at setFsWatchListener (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:48643:15)
at NodeFsHandler._watchWithNodeFs (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:48798:14)
at NodeFsHandler._handleDir (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:49034:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async NodeFsHandler._addToNodeFs (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:49084:16)
at async file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:50100:21
at async Promise.all (index 0)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:50296:10)
at NodeFsHandler._addToNodeFs (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:49112:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:50100:21
at async Promise.all (index 0) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
path: '/home/user/mount/Websites/test/app/View/Components',
filename: '/home/user/mount/Websites/test/app/View/Components'
}
Node.js v18.13.0
I'm so lost and can't seem to find any good topics on this specific issue. Has this happened to anyone else?