refactor: add no sandbox args in puppeteer

This commit is contained in:
moonrailgun 2024-09-29 23:39:28 +08:00
parent 1485c9cf9b
commit 90ec6c2fcd

View File

@ -8,6 +8,7 @@ export async function generateLighthouse(url: string): Promise<Result> {
const browser = await puppeteer.launch({
// Set to false if you want to see the script in action.
headless: 'new',
args: ['--no-sandbox'],
defaultViewport: null,
ignoreDefaultArgs: ['--enable-automation'],
});