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
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
System:
OS: Linux 4.20 Manjaro Linux undefined
CPU: (8) x64 Intel(R) Core(TM) 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
i believe this is the same issue https://github.com/gatsbyjs/gatsby/issues/2347
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.
Hiya!
This issue has gone quiet. Spooky quiet. 馃懟
We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 馃挭馃挏
Hey again!
It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.
Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community!
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 your init.el (Emacs configuration file):
(setq create-lockfiles nil)
This will disable the creation of symlink files.
I am neither a UI guy, nor a Gatsby pro - but a colleague mentioned exclude configs for gatsby-source-filesystem.
I had success with the following plugin config in gatsby-config.js so far (no guarantees)
With that you dont need to change emacs config (your choice)...
plugins: [
{
resolve:gatsby-source-filesystem,
options: {
path:${__dirname},
name: 'tempfiles',
ignore: [*/.#]
},
},
...
]
With that you don't need to change emacs config (your choice)...
plugins: [ { resolve: `gatsby-source-filesystem`, options: { path: `${__dirname}`, name: 'tempfiles', ignore: [`**/\.#*`] }, }, ... ]
Although this doesn't seem to work with me for gatsby develop, emacs lock files still break the build. (And I don't want to disable the lockfiles)
This is interesting. I dont have time to validate this in depth. But I have a setup running with old dependencies: I am not sure which one is the cause to work - source filesystem is the following version:
"gatsby-source-filesystem": "^2.3.26",
After upgrading its not working anymore :(
May be I find the time to enclose this to a specifig package. But I cant promise...
See also webpack config solution https://github.com/gatsbyjs/gatsby/issues/25562#issuecomment-684399348
Most helpful comment
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.