From e3f9b53451d15ef20084b556a56b570770d83831 Mon Sep 17 00:00:00 2001 From: HangerThem Date: Mon, 3 Aug 2026 20:00:40 +0200 Subject: [PATCH] Fix puppeteer --- lib/mermaid-render.ts | 4 +++- nixpacks.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/mermaid-render.ts b/lib/mermaid-render.ts index 706a8ef..162dab7 100644 --- a/lib/mermaid-render.ts +++ b/lib/mermaid-render.ts @@ -4,7 +4,9 @@ let browserPromise: Promise | null = null function getBrowser() { if (!browserPromise) { - browserPromise = launch({ headless: true }) + browserPromise = launch({ + args: ['--no-sandbox', '--disable-setuid-sandbox'], + }) } return browserPromise } diff --git a/nixpacks.toml b/nixpacks.toml index e6ec59c..8ad5b72 100644 --- a/nixpacks.toml +++ b/nixpacks.toml @@ -1,2 +1,2 @@ [phases.setup] -aptPkgs = ["libnss3", "libatk1.0-0", "libatk-bridge2.0-0", "libcups2", "libgbm1", "libasound2t64", "libpangocairo-1.0-0", "libxss1", "libgtk-3-0", "libxshmfence1", "libglu1", "chromium", "unzip", "curl", "wget", "git"] \ No newline at end of file +aptPkgs = ["libnss3", "libatk1.0-0", "libatk-bridge2.0-0", "libcups2", "libgbm1", "libasound2t64", "libpangocairo-1.0-0", "libxss1", "libgtk-3-0", "libxshmfence1", "libglu1", "chromium", "unzip", "curl", "wget"] \ No newline at end of file