node.js - Node 监视器错误 : "System limit for number of file watchers reached"

标签 node.js graphql nodemon

我正在学习 GraphQL并且正在使用 prisma-binding 进行 GraphQL 操作。我在启动 Node.js 服务器时遇到了这个 nodemon 错误,它为我提供了由 graphql-cli 自动生成的模式文件的路径。这个错误是怎么回事?

错误:

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

最佳答案

如果您使用的是 Linux,您的项目将达到系统的文件观察器限制

要解决此问题,请在您的终端上尝试:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

关于node.js - Node 监视器错误 : "System limit for number of file watchers reached",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53930305/

相关文章:

javascript 根据搜索词查找对象

http - Node.js:获取响应时间

node.js - 如何优雅地在 Swift 中实现 EventEmitter

graphql - 如何将现有的 dynamo db 与 AWS Amplify 和 graphql 结合使用

node.js - 在 nodemon 发生变化时运行脚本

node.js - 通过 Dialogflow 实现设置 Google Actions 的上下文

amazon-web-services - 发布 AWS Amplify GraphQL 突变时如何避免在数组中创建重复项

typescript - 如何省略嵌套数组类型的属性

node.js - Node js os.networkInterfaces() 在通过 AWS 上的 docker 入口点调用时不返回任何结果

node.js - Nodemon 不受 nunjucks 文件的影响