Nodemon Error: System limit for number of file wat

2020-02-18 04:26发布

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

4条回答
smile是对你的礼貌
2楼-- · 2020-02-18 04:43

On Linux, I've actually run with sudo. sudo npm start

查看更多
太酷不给撩
3楼-- · 2020-02-18 04:46

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.

查看更多
我只想做你的唯一
4楼-- · 2020-02-18 04:59

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.

查看更多
啃猪蹄的小仙女
5楼-- · 2020-02-18 05:04

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
查看更多
登录 后发表回答