fix: puppeteer
This commit is contained in:
parent
892be17414
commit
27fc04c0f4
@ -1,6 +1,6 @@
|
||||
// app/api/seo-check/route.js
|
||||
import { NextResponse } from "next/server";
|
||||
import puppeteer from "puppeteer";
|
||||
import puppeteer from "puppeteer-core";
|
||||
|
||||
export async function POST(request) {
|
||||
const startTime = Date.now();
|
||||
@ -38,8 +38,12 @@ export async function POST(request) {
|
||||
try {
|
||||
browser = await puppeteer.launch({
|
||||
executablePath: process.env.NEXT_CHROMIUM_PATH,
|
||||
headless: true,
|
||||
args: ["--no-sandbox"],
|
||||
headless: "new",
|
||||
args: [
|
||||
"--no-sandbox",
|
||||
"--disable-setuid-sandbox",
|
||||
"--disable-dev-shm-usage",
|
||||
],
|
||||
});
|
||||
} catch (e) {
|
||||
return NextResponse.json(
|
||||
|
Loading…
x
Reference in New Issue
Block a user