Fix Runner: Explicitly set chromium path on Linux

This commit is contained in:
2025-12-27 23:45:17 +11:00
parent c332ba1b45
commit 89209b71e2

View File

@@ -22,12 +22,13 @@ async function runTest(url, options = {}) {
fs.mkdirSync(reportDir, { recursive: true }); fs.mkdirSync(reportDir, { recursive: true });
} }
// Launch Chrome // Launch Chrome
const chromePath = require('puppeteer').executablePath(); console.log('Launching Chrome...');
const chrome = await chromeLauncher.launch({ const chromePath = process.platform === 'linux' ? '/usr/bin/chromium' : undefined;
chromePath, const chrome = await chromeLauncher.launch({
chromeFlags: ['--headless', '--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage'] chromeFlags: ['--headless', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
}); chromePath: chromePath
});
// Lighthouse Config // Lighthouse Config
const port = chrome.port; const port = chrome.port;