问题
I'm learning graphql
and using prisma-binding
for graphql operations. I'm facing this nodemon
error while I'm starting my node server and its giving me the path of schema file which is auto generated by a graphql-cli
. Can anyone tell me what this error is all about ?
Error:
Internal watch failed: ENOSPC: System limit for number of file watchers reached, watch '/media/rehan-sattar/Development/All projects/GrpahQl/graph-ql-course/graphql-prisma/src/generated
Thank you folks!!
回答1:
If you are using Linux, your project is hitting your system's file watchers limit
To fix this, on your terminal, try:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
回答2:
I sometimes get this issue when working with VSCode on my Ubuntu machine.
In my case the following workaround helps:
stop the watcher, close VScode, start the watcher, open VSCode again.
回答3:
You need to increase the inotify watchers limit for users of your system. You can do this from the command line with:
sudo sysctl -w fs.inotify.max_user_watches=100000
That will persist only until you reboot, though. To make this permanent, add a file named /etc/sysctl.d/10-user-watches.conf
with the following contents:
fs.inotify.max_user_watches = 100000
After making the above (or any other) change, you can reload the settings from all sysctl configuration files in /etc
with sudo sysctl -p
.
回答4:
On Linux, I've actually run with sudo.
sudo npm start
来源:https://stackoverflow.com/questions/53930305/nodemon-error-system-limit-for-number-of-file-watchers-reached