emacs autosave files cause builds to fail
See original GitHub issueDescription
gatsby build
will hang indefinitely at the “Source and transform nodes” step when there is an emacs autosave file for a md file imported using gatsby-source-filesystem. Emacs autosave files have the same filename as the edited file but prefixed with “.#”. I believe ignoring hidden files
Steps to reproduce
edit a markdown file imported by gatsby-source-filesystem in emacs wait and allow emacs to create an autosave file attempt to build the project observe that build hangs indefinitely
Environment
System: OS: Linux 4.20 Manjaro Linux undefined CPU: (8) x64 Intel® Core™ i7-4870HQ CPU @ 2.50GHz Shell: 5.7.1 - /usr/bin/zsh Binaries: Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node npm: 6.10.1 - ~/.nvm/versions/node/v10.16.0/bin/npm Languages: Python: 3.7.3 - /usr/bin/python npmGlobalPackages: gatsby: 2.13.35
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
[Solved]
Turns out that those aren’t auto-saved temp files, but rather symbolic link files.
If you’re using Emacs and those
.#
files trouble your development flow, try this option in yourinit.el
(Emacs configuration file):This will disable the creation of symlink files.
References:
Issue #2347 was closed with out a fix. It seems that someone suggested having file watcher ignore the editor files. I’d recommend the opposite create a default list of file extensions that gatsby watches (.css, .js, .xml, .img etc, etc) Then if you need to create some exception you can add it to the list.