【问题标题】:Emfile error running nodemonEmfile错误运行nodemon
【发布时间】:2013-12-04 10:52:19
【问题描述】:

似乎无法启动并运行 nodemon。

仅在使用 node (node app.js) 时有效,但在使用 nodemon (nodemon app.js) 时返回以下 Emfile 错误:

20 Nov 12:26:33 - [nodemon] v0.7.10
20 Nov 12:26:33 - [nodemon] to restart at any time, enter `rs`
20 Nov 12:26:33 - [nodemon] watching: /home/ramzi/ST/swaggertrack
20 Nov 12:26:33 - [nodemon] starting `node app.js`
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
Express server listening on port 80
mongo is connected
EMFILE: Watching too many files.
EMFILE: Watching too many files.
EMFILE: Watching too many files.
EMFILE: Watching too many files.

有人有什么想法吗?

谢谢。

【问题讨论】:

  • EMFILE 发生在您的进程一次打开太多文件时。您的文件夹中有多少个文件/子目录?此外,使用您不想观看的文件或目录编辑your .nodemonignore file,这应该可以解决问题。
  • 不得不重新安装 node、npm 和 nodemom 并重新克隆了我的 git repo。然后它起作用了,所以认为这是由于某种图书馆重复造成的。

标签: node.js nodemon


【解决方案1】:

如果您更新到 nodemon@1.0.12(当前最新),它会警告是否有太多的文件被监视(即 > 25,000 个文件 - 我选择了一个粗略的任意数字)。如果您没有收到该警告,则可能是您的脚本。

很高兴在http://github.com/remy/nodemon/issues/new 帮助调试(假设您使用的是最新版本)

【讨论】:

    猜你喜欢
    • 2016-02-23
    • 2019-11-13
    • 2017-04-27
    • 2018-12-25
    • 1970-01-01
    • 1970-01-01
    • 2021-05-13
    • 2020-12-08
    • 2014-02-13
    相关资源
    最近更新 更多