refactor: add no sandbox args in puppeteer

This commit is contained in:
moonrailgun 2024-09-29 23:39:28 +08:00
parent 23c691541d
commit 8b6a74033c

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'],
});