Running hugo -D server --disableFastRender on Fedora 31.
Very frequently when I make changes, Hugo gives an error similar to:
Rebuild failed:
Process: loading templates: walk: Readdir: decorate: lstat /bulk/tmp/quickstart/themes/september/layouts/partials/jv@phoenix.squirrel.nl.1048540:1590046260: no such file or directory
Hugo Static Site Generator v0.71.1-A301F6B2/extended linux/amd64 BuildDate: 2020-05-25T09:18:12Z
I need to restart hugo, or create this directory manually.
Any ideas what I can do to avoid this?
Unpack it in an empty directory.
Start the hugo server
In a browser visit http://localhost:1313
On the landing page, click the top-left icon to go to the home page.
On the home page, click the top-right icon to go to the hers page.
In an external editor visit content/home/index.md.
Make some changes and save. Repeat.
On my system after a couple of changes the error page is displayed.
I hope you can reproduce this.
My hugo is Hugo Static Site Generator v0.71.1-A301F6B2/extended linux/amd64 BuildDate: 2020-05-25T09:18:12Z
My system is Fedora 31. Browser is Firefox 76.
Iām not sure if this is the case here but several tools that use inotify file watching have occasional problems with Emacs. Iāll see if I can tackle this from the Emacs side.
I suspect you have an editor that writes very temporary temp files which it then deletes. Hugo should admittedly handle that situation (I think we mostly ignore āfile not foundā errors), but that filename looks very odd, so I would have a look at your editor or whatever setup and see what that does.
When Emacs is editing a file, say foo.txt, it creates temporary files #foo.txt# and .#foo.txt (which is a symlink to something similar to jv@phoenix.squirrel.nl.1222240:1590046260). These are auto-save and lock files.
When the file is saved for the first time the original file is renamed to foo.txt~ and the new content is written to a new file foo.txt.
This behaviour is long standing (30 years or soā¦) and is not easy to modify from the Emacsā side. Also, other tools make use of this behaviour.
So the best option would be if hugo ignores these files completely. Or to add a config setting with patterns of files to be ignored.