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

RenderUndefinedEntryError error when editing config with the --force content layer flag #12456

Open
1 task
HiDeoo opened this issue Nov 16, 2024 · 0 comments
Open
1 task
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: content layer Related to the Content Layer feature (scope)

Comments

@HiDeoo
Copy link
Member

HiDeoo commented Nov 16, 2024

Astro Info

Astro                    v5.0.0-beta.8
Node                     v18.20.3
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Using content layer and developing a remark plugin inlined in my Astro config file, I'm running the npm run dev -- --force command to force the Astro dev server to restart when editing my plugin and having it run every time as the cache is cleared every time.

Reproduction steps:

  1. Open the linked repro
  2. Ctrl + C to stop the server
  3. Run the npm run dev -- --force command
  4. Edit the configuration and save the file (it could be an edit to the remark plugin or even to a comment in the config file)

The The collection "posts" does not exist. Please ensure it is defined in your content config. message is logged 1 or multiple times and then the following error is thrown:

[ERROR] [RenderUndefinedEntryError] 
  Hint:
    Check if the entry is undefined before passing it to `render()`
  Error reference:
    https://docs.astro.build/en/reference/errors/render-undefined-entry-error/
  Stack trace:
    at /home/projects/mklirypram.github/node_modules/astro/dist/core/errors/errors.js:17:5
    [...] See full stack trace in the browser, or rerun with --verbose.

Note that the error can also happens sometime without even editing the config file but it seems to recover somehow.

What's the expected result?

I'm expecting the server to restart and my plugin to be re-run without any errors.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-qstek1?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 16, 2024
@ematipico ematipico added - P3: minor bug An edge case that only affects very specific usage (priority) feat: content layer Related to the Content Layer feature (scope) labels Nov 18, 2024
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: content layer Related to the Content Layer feature (scope)
Projects
None yet
Development

No branches or pull requests

2 participants