-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hexo server crashes on every file change #1221
Comments
Exact same problem here. Arch Linux x64. |
I have the same issue, but it only appears when I use vim to edit the markdown files. Editing and saving using mousepad doesn't produce the same behaviour. I've seen similar problems with other node apps which watch files for changes. I suspect that Emacs will also be affected, which editor are you using when the issue appears? Vim writes to a swap file then either renames or switches it out with the actual file when you save it, I couldn't find exact details in the docs. The way it does this confuses or conflicts with many file watching systems in different languages. This was the most similar issue in a javascript project that I could find: I suspect that one of the dependencies which does the file monitoring is either mishandling the file system events produced by the vim save sequence, or the handlers in hexo aren't accounting for this situation (the first is most likely given the E_ISDIR error) |
I was indeed using Vim at the time. That explanation makes sense. |
I get this error and I am using emacs. |
I was having the same issue, editing with Vim on linux. It looks like hexo-fs's dependencies list chokidar at a very outdated version (0.12). Chokidar is what is responsible for watching the file system and the latest version is 1.0.5. Not ideal, but I manually bumped the version to 1.0.5 in hexo-fs's package.json and re-installed the module and now watching files works fine without errors. |
I followed marrone's suggestion to upgrade chokidar version, and that does fix the problem. |
For the sake of completeness, this also happens when using Github's Atom Editor with the Option |
chokidar was updated back in April. |
Hi,
here is my test workflow:
hexo init test-hexo
cd test-hexo && npm install
hexo server --port 9778
I tried this with node versions 0.10.38 and 0.12.2. I don't know if this is important, but I get warnings during
npm install
, here is the log:The text was updated successfully, but these errors were encountered: