From 63f90838b2beae8ae32bf9253bd3a359c7677ea6 Mon Sep 17 00:00:00 2001 From: Hermes Cron Job Date: Wed, 7 Oct 2026 13:33:16 +0000 Subject: [PATCH] fix(scripts): headless check now says 'run npm run build' instead of failing obscurely Without dist/ it reported 'no webgl context captured', which points at WebGL when the actual problem was that there was no page to load. --- scripts/headless-check.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/headless-check.mjs b/scripts/headless-check.mjs index 20dea77..6f7d170 100644 --- a/scripts/headless-check.mjs +++ b/scripts/headless-check.mjs @@ -23,6 +23,11 @@ const dist = join(root, 'dist'); const PORT = Number(process.env.CHECK_PORT || 4176); const CDP_PORT = Number(process.env.CDP_PORT || 9333); +if (!existsSync(join(dist, 'index.html'))) { + console.error('HEADLESS CHECK FAILED: dist/index.html not found. Run `npm run build` first.'); + process.exit(1); +} + function findChrome() { if (process.env.CHROME) return process.env.CHROME; const candidates = [