Node.js – Nodemon Error: System limit for number of file watchers reached

graphqlnode.jsnodemon

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

Best Answer

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
Related Topic