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

Build fails when prerendering pages with catch-all route strings configured #1529

Closed
andriygm opened this issue Feb 28, 2024 · 3 comments
Closed
Labels

Comments

@andriygm
Copy link

andriygm commented Feb 28, 2024

Description

When pre-rendering is set to partial, the page should still render instead of causing the entire build to fail -- it should either fall back to pre-rendering the filesystem route or some other fallback. (this issue is partially related to #1476 WRT allowing framework client-side router to take over under catch-all routes)

Reproduction

https://stackblitz.com/edit/vcirhv

@andriygm andriygm changed the title Building fails when prerendering pages with catch-all route strings configured Build fails when prerendering pages with catch-all route strings configured Feb 28, 2024
@brillout
Copy link
Member

How is that not a duplicate of #1476?

https://stackblitz.com/edit/vcirhv

What are the reproduction steps?

build to fail

What is the thrown error?

Closing, but I'll re-open after we get to some more clarity.

@brillout brillout closed this as not planned Won't fix, can't repro, duplicate, stale Feb 29, 2024
@andriygm
Copy link
Author

How is that not a duplicate of #1476?

I suppose it's a subset of #1476 -- this issue is more so referring to the fact that pre-render flat out fails -- IMO the build should at least fall back to its filesystem route and throw a warning reference the limitation present in #1476.

What are the reproduction steps?

Whoops, the stackblitz link is missing the prerender: partial config, see below for correct reproduction

  1. Start with Bati Solid project
  2. Add catch-all to pages/index/ folder under +route.ts
  3. Add prerender: {partial: true} to vite.config.ts under vike plugin
  4. pnpm run build

What is the thrown error?

    at Module.getUrlFromRouteString (/home/projects/vcirhv/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/shared/route/resolveRouteString.js:131:17)
    at eval (/home/projects/vcirhv/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/prerender/runPrerender.js:282:61)
    at eval (/home/projects/vcirhv/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/utils/pLimit.js:44:37)
    at run (/home/projects/vcirhv/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/utils/pLimit.js:44:49)
    at eval (/home/projects/vcirhv/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/utils/pLimit.js:62:32)```

@brillout
Copy link
Member

brillout commented Mar 1, 2024

Agreed & done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants