Issue with `spawn EBADF` on macOS

Hi, I'm encountering a persistent spawn EBADF error when trying to run any shell commands via exec or bash tools on a macOS host.

System Details:
- OS: macOS (Darwin 25.2.0, arm64 / Mac mini)
- Node.js Version: v25.3.0
- Error: spawn EBADF

Description:
Every attempt to execute a command (e.g., pip3 install, ls, which) fails immediately with this error. It started occurring suddenly during the session. It seems like a file descriptor issue within the spawn process on this specific Node/macOS version.

Could you please look into this? Thanks!
Solution
Update / Confirmation:

I have deleted the specific project folder containing the heavy node_modules structure (skills/eufy). The spawn EBADF error disappeared immediately, and the bot is functioning correctly now.

This definitively confirms the issue was caused by the file watcher hitting the system's file descriptor limit due to missing ignore patterns for node_modules.
Was this page helpful?