Issue Description:
1. The `npm run dev` command starts normally for a second or two.
2. Then the system begins to output errors: `Error: ENOSPC: System limit for number of file watchers reached, watch`.
3. The command fails to complete successfully.
Steps to Reproduce:
1. In the folder `~/web/dev.jeftinoputovanje.com/jeftput`, run `npm run dev`.
2. After a short period, the error appears, indicating the system limit for file watchers has been reached.
Through investigation, we found that the error is likely related to the default system limit for file watchers. The application requires more watchers than currently available. A potential solution is to increase the number of available file watchers, or to check what else on the server is consuming watchers so you can reduce usage if possible.
For further details, you can refer to the following links:
1. https://laracasts.com/discuss/channels/ ... yId=852603
2. https://stackoverflow.com/questions/557 ... rs-reached
Below are two code blocks demonstrating the output we receive:
**Code block1**:
Code: Select all
VITE v4.5.1 ready in 228 ms
→ Local: http://localhost:5173/
→ Network: use --host to expose
→ press h to show help
LARAVEL v10.8.0 plugin v0.7.8
→ APP_URL: http://localhost
Code: Select all
(node:2008118) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag "--unhandled-rejections=strict" (see https://[MASKED_PATH] for unhandled rejections mode). (rejection id: 20)
(node:2008118) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag "--unhandled-rejections=strict" (see https://[MASKED_PATH] for unhandled rejections mode). (rejection id: 8425)
Increase the system limit for file watchers. You can do this by editing the system configuration as follows:
Code: Select all
# insert the new value into the system config
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
# check that the new value was applied
cat /proc/sys/fs/inotify/max_user_watches
Code: Select all
npm run dev