eleventy
eleventy copied to clipboard
"Unhandled rejection in promise" error when saving changes to Markdown files
Here's my MWE repo to replicate/validate the error: https://github.com/jamesbont11tyrepo/11ty-MWE
To reproduce the error, run npm start for the repo and then simply:
- Open one of the Markdown files.
- Make changes to the file.
- Save the changes.
The terminal should show error text like so:
[11ty] Unhandled rejection in promise: (more in DEBUG output)
[11ty] Tried to use templateContent too early on ./file/path/with/markdown/file.md (via TemplateContentPrematureUseError)
[11ty]
[11ty] Original error stack trace: TemplateContentPrematureUseError: Tried to use templateContent too early on ./file/path/with/markdown/file.md
The Eleventy Discord group has tried helping me figure out what's causing the error, but we're stumped (discussion topic here: https://discord.com/channels/741017160297611315/1182433386111971338). Sometimes we'd find the error happens on some Markdown files for some of us, but not for other people, so if you don't get the error on one Markdown file, try the other. I hope we can find the cause of this error and a solution!
Just noticed this other bug has the same issue I'm having, but they're on the 3.0 alphas, whereas I'm on the stable 2.0 version.
https://github.com/11ty/eleventy/issues/3136
This one started happening after I upgraded to 3.0.0-alpha.6, when I save my CSS I occasionally get the error.