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

Using dynamic routes in SSR mode with prerender causes "Cannot read properties of undefined (reading 'endsWith') " #5838

Closed
1 task
jamestoot opened this issue Jan 12, 2023 · 1 comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@jamestoot
Copy link

What version of astro are you using?

1.9.2

Are you using an SSR adapter? If so, which one?

Netlify

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

When using the new prerender option in SSR mode an error is thrown if you try:

export const prerender = true;

In a dynamic route file (see stackblitz example src/pages/category/[slug].astro)

image

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-f5zg4q?file=src/pages/category/[slug].astro

Participation

  • I am willing to submit a pull request for this issue.
@matthewp matthewp added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Jan 12, 2023
@natemoo-re
Copy link
Member

Thanks for the issue! This was fixed in #5734 and released as part of astro@2.0.0-beta.1. Here's a confirmation that your repro is working on the latest!

We decided not to backport the fix because it was behind an experimental flag on v1.x and v2.0 will be stable very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

No branches or pull requests

3 participants