Skip to content
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

"Unhandled rejection in promise" error when saving changes to Markdown files #3146

Closed
ghost opened this issue Jan 3, 2024 · 7 comments
Closed
Assignees
Labels
needs-test-case Please submit a reproducible test case showcasing the issue! needs-triage

Comments

@ghost
Copy link

ghost commented Jan 3, 2024

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:

  1. Open one of the Markdown files.
  2. Make changes to the file.
  3. 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!

@ghost
Copy link
Author

ghost commented Jan 12, 2024

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.

#3136

@huphtur
Copy link

huphtur commented Apr 13, 2024

This one started happening after I upgraded to 3.0.0-alpha.6, when I save my CSS I occasionally get the error.

@zachleat
Copy link
Member

zachleat commented Sep 9, 2024

#3410 is maybe also related

@danjordan
Copy link

danjordan commented Oct 1, 2024

I'm still seeing this issue in 3.0.0-beta.2 within a markdown file. It seems to happen when I have tags in my front matter.

After a bit of investigation it looks like I had a circular dependency.

@zachleat zachleat self-assigned this Oct 1, 2024
@zachleat
Copy link
Member

zachleat commented Oct 1, 2024

I can’t access the original repo of this one to look.

I did go into Discord and saw a bunch of discussion (wow!) and some links to https://github.com/Aankhen/jamesbont-11tysite @shivjm but I don’t see that repo either.

@zachleat zachleat added the needs-test-case Please submit a reproducible test case showcasing the issue! label Oct 1, 2024
@zachleat
Copy link
Member

zachleat commented Oct 1, 2024

As the OP’s account was deleted, @danjordan can you file a new issue?

@zachleat zachleat closed this as completed Oct 1, 2024
@Aankhen
Copy link

Aankhen commented Oct 1, 2024

Sorry, I think I deleted my repository a long time ago, partly because I couldn’t reliably reproduce the issue. I thought I had pinpointed it, then I didn’t, then I did, then… 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-test-case Please submit a reproducible test case showcasing the issue! needs-triage
Projects
None yet
Development

No branches or pull requests

4 participants