#EMFILE: too many open files, watch problems
3 messages · Page 1 of 1 (latest)
Based on the knowledge sources provided, it appears that you're experiencing a common issue with Nuxt related to file watching. Here are some suggestions to address your "EMFILE: too many open files, watch" problem:
-
Use the Parcel watcher:
The most effective solution mentioned in the knowledge sources is to switch to the experimental Parcel watcher. You can do this by adding the following to yournuxt.config.tsfile:export default defineNuxtConfig({ experimental: { watcher: "parcel", }, })This solution has been reported to work for several users across different operating systems, including macOS and Windows Github Issue: too many open files on build.
-
Adjust Chokidar settings:
If you prefer to stick with the default Chokidar watcher, you can try adjusting its settings in yournuxt.config.ts:export default defineNuxtConfig({ watchers: { chokidar: { ignoreInitial: true, ignorePermissionErrors: true } } })This configuration is based on the default settings mentioned in the Nuxt Configuration documentation.
-
Increase system file limits:
While you mentioned tryingulimit -n, it's worth noting that this change might not persist across sessions. You may need to set this limit more permanently in your system configuration.
If these solutions don't resolve your issue, it's possible that the problem is more complex or related to your specific project setup. In that case, you might want to create a minimal reproduction of the issue and seek further assistance from the Nuxt community through their GitHub issues or discussions.