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.
This commit is contained in:
Hermes Cron Job committed 2026-10-07 13:33:16 +00:00
1 parent ee24276fd0
commit 63f90838b2
1 file changed
+5
+5
View File
@@ -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 = [