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

New prerender option breaks catch-all route on root when using preview #6020

Closed
1 task
andycansdale opened this issue Jan 29, 2023 · 8 comments · Fixed by #6287
Closed
1 task

New prerender option breaks catch-all route on root when using preview #6020

andycansdale opened this issue Jan 29, 2023 · 8 comments · Fixed by #6287
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@andycansdale
Copy link

What version of astro are you using?

2.0.2

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

Node

What package manager are you using?

yarn

What operating system are you using?

Mac

Describe the Bug

Using Node in standalone mode and given the following pages directory:

/pages
   myfirstpage.astro
   mysecondpage.astro
   [...params].astro

If we apply export const prerender = true to any page on the root (i.e. myfirstpage or mysecondpage) then the rest route [...params].astro returns a 404 in preview mode after a new build. When in dev mode the page displays correctly.

The page also displays correctly if nested in another folder. In other words if we move it off the root.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-n7aqnf?file=src/pages/mypage.astro

Participation

  • I am willing to submit a pull request for this issue.
@matthewp
Copy link
Contributor

matthewp commented Feb 8, 2023

Prerender support was added to the Node adapter in 5.0.3. This should be working now!

@matthewp matthewp closed this as completed Feb 8, 2023
@andycansdale
Copy link
Author

Hi! I've just tested this with the Node adapter version 5.0.3 and the problem persists. if I prerender any page, the [...params].astro page on the root still throws a 404. As mentioned, this only happens after building the app. I can work fine in dev mode and navigate to our [...paras].astro page without any issues.

@matthewp
Copy link
Contributor

matthewp commented Feb 9, 2023

Thanks! Reopening

@matthewp matthewp reopened this Feb 9, 2023
@florian-renfer
Copy link

I am having the same issue, glad you are already working on it.

@JerryWu1234
Copy link
Contributor

mark

@JerryWu1234
Copy link
Contributor

I have just done a bug related to prerender issues.
I can help to check this bug.

JerryWu1234 added a commit to JerryWu1234/astro that referenced this issue Feb 18, 2023
JerryWu1234 added a commit to JerryWu1234/astro that referenced this issue Feb 18, 2023
JerryWu1234 added a commit to JerryWu1234/astro that referenced this issue Feb 21, 2023
@JerryWu1234 JerryWu1234 mentioned this issue Feb 21, 2023
@natemoo-re natemoo-re added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Feb 21, 2023
@leomp12
Copy link

leomp12 commented Feb 21, 2023

Just trying to give more two cents here: it's not only on preview mode, prerender = true is also breaking catch-all route on Node SSR with middleware mode on production (astro dev works fine)

@JerryWu1234
Copy link
Contributor

Just trying to give more two cents here: it's not only on preview mode, prerender = true is also breaking catch-all route on Node SSR with middleware mode on production (astro dev works fine)

Thanks for your hint.
I will try out what you said in my local

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

Successfully merging a pull request may close this issue.

6 participants