vp build / void deploy exit 0 when a page fails to prerender, and the page is silently missing
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #586 by @0froq — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript, vite
- Domain
- build-system, cli
Research direction
Start with packages/void/src/plugin-prerender.ts and cli/deploy-managed-full.ts, where the issue says failed prerenders are only warned about. Trace how each build and deploy path handles result.failed, then check the build and deploy behavior for the supplied static app repro. Done means either path reports failure with a non-zero exit when a page fails to prerender, or implements the requested opt-in strict behavior.
Written by the indexing model from the issue text.
Description
Version: void 1.2.1 (also 1.1.12); main at a6de7829.
Repro
- A static Void app (
output: 'static'). pages/throws.island.tsx:export default function Throws(): never { throw new Error('boom'); }vp build; echo $?, thenls dist/client/throws.html.
Actual:
[void] prerender /throws failed: HTTP 500
[void] 1 page(s) failed to prerender
0
ls: cannot access 'dist/client/throws.html': No such file or directory
void deploy does the same (deploy-managed-full.ts), so the deploy ships without the page.
Expected: a non-zero exit when any page fails to prerender, or at least an opt-in such as routing.prerenderFailures: 'error' or --strict. A CI build should not report success while a route is gone from production.
Cause: packages/void/src/plugin-prerender.ts:67-69 and cli/deploy-managed-full.ts call voidWarn(...) on result.failed.length > 0 and nothing else. Throwing there (or this.error(...) in closeBundle) would fail the build.
- Dominant language
- TypeScript
- Stars
- 580
- Forks
- 56
- Avg merge
- 12h 25m
- Merged PRs (30d)
- 134
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/void
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
voidzero-dev/void#599 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 82/100
voidzero-dev/void#596 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 56/100
voidzero-dev/void#579 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
voidzero-dev/void#575 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
voidzero-dev/void#573 ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/void
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
VictoriaMetrics/victorialogs-datasource#747 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
bug from-studio
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
esengine/DeepSeek-Reasonix#14608 ·
Maintainers usually reply within 1 day
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
getarcaneapp/arcane#4590 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Clouditera/VulnHunter#57 ·