You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my Window 7 system, the "hexo server" command will usually crash with the EMFILE error. I say usually because if I run "hexo clean && hexo server" enough times then it eventually works. Below is my cmd shell dump...
Error: EMFILE: too many open files, open 'C:\Users\andjon\Source\janderland\node_modules\readdirp\stream-api.js'
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:431:33)
at Object.Module._extensions..js (module.js:421:20)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at readdir (C:\Users\andjon\Source\janderland\node_modules\readdirp\readdirp.js:52:25)
at FSWatcher. (C:\Users\andjon\Source\janderland\node_modules\chokidar\lib\nodefs-handler.js:355:5)
at FSWatcher.NodeFsHandler._handleDir (C:\Users\andjon\Source\janderland\node_modules\chokidar\lib\nodefs-handler.js:406:18)
at FSWatcher. (C:\Users\andjon\Source\janderland\node_modules\chokidar\lib\nodefs-handler.js:455:19)
at FSWatcher. (C:\Users\andjon\Source\janderland\node_modules\chokidar\lib\nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:82:15)
I tested the exact same hexo site on my Macbook and an EMFILE error is never thrown.
Notice that the EMFILE error actually occur's during a require() call by the readdirp module. One possible solution could be to 'gracefulify' the fs module during the hexo-fs module's initialization...
var fs = require('graceful-fs'); var nodeFs = require('fs'); fs.gracefulify(nodeFs);
... though I haven't tested the effects this would have on performance.
The text was updated successfully, but these errors were encountered:
Thanks for your feed back. Hexo won't handle system I/O. People also raising similar issue on windows bash microsoft/WSL#1126 . They provide some solution, hope that would help.
On my Window 7 system, the "hexo server" command will usually crash with the EMFILE error. I say usually because if I run "hexo clean && hexo server" enough times then it eventually works. Below is my cmd shell dump...
I tested the exact same hexo site on my Macbook and an EMFILE error is never thrown.
Notice that the EMFILE error actually occur's during a require() call by the readdirp module. One possible solution could be to 'gracefulify' the fs module during the hexo-fs module's initialization...
var fs = require('graceful-fs'); var nodeFs = require('fs'); fs.gracefulify(nodeFs);
... though I haven't tested the effects this would have on performance.
The text was updated successfully, but these errors were encountered: