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 });
}
// Launch Chrome
const chromePath = require('puppeteer').executablePath();
const chrome = await chromeLauncher.launch({
chromePath,
chromeFlags: ['--headless', '--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage']
});
// Launch Chrome
console.log('Launching Chrome...');
const chromePath = process.platform === 'linux' ? '/usr/bin/chromium' : undefined;
const chrome = await chromeLauncher.launch({
chromeFlags: ['--headless', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
chromePath: chromePath
});
// Lighthouse Config
const port = chrome.port;