From a384bccb44c505731daeb919f9d9f837ecb3f81c Mon Sep 17 00:00:00 2001 From: Arnel Robles Date: Wed, 19 Aug 2026 10:55:55 +0800 Subject: [PATCH 1/2] ci: install Chrome so the puppeteer tests can run mermaid-export renders through puppeteer and eleven of its tests fail on 'Could not find Chrome (ver. 131.0.6778.204)'. The browser normally arrives via puppeteer's postinstall, which is not running here. Locally, where the browser is cached, all 160 tests pass. --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0916d0..7e5aba6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,13 @@ jobs: - run: pnpm install --frozen-lockfile + # mermaid-export renders through puppeteer, which needs a real Chrome. The + # browser arrives via puppeteer's postinstall script, and that does not run + # here, so eleven of its tests fail with "Could not find Chrome (ver. …)". + # Installing it explicitly does not depend on lifecycle-script behaviour. + - name: Install Chrome for puppeteer + run: pnpm exec puppeteer browsers install chrome + - name: Typecheck run: pnpm typecheck From e7e72414b354459afb64dcebe953ed1e4f0391cf Mon Sep 17 00:00:00 2001 From: Arnel Robles Date: Sun, 23 Aug 2026 15:23:45 +0800 Subject: [PATCH 2/2] Filter the Chrome install to the package that has puppeteer The previous version ran pnpm exec from the workspace root, where the puppeteer binary does not exist, so CI failed with Command "puppeteer" not found before it reached the package that has it. Reproduced both locally: the bare command fails the same way, the filtered one installs chrome@131.0.6778.204 and the suite goes to 160 passed, 1 skipped. --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e5aba6..f45d56d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,11 +36,14 @@ jobs: - run: pnpm install --frozen-lockfile # mermaid-export renders through puppeteer, which needs a real Chrome. The - # browser arrives via puppeteer's postinstall script, and that does not run - # here, so eleven of its tests fail with "Could not find Chrome (ver. …)". - # Installing it explicitly does not depend on lifecycle-script behaviour. + # browser normally arrives via puppeteer's postinstall script, which does not + # run here, so eleven of its tests failed with "Could not find Chrome (ver. …)". + # + # Filtered to the one package that depends on puppeteer. A bare `pnpm exec` runs + # from the workspace root, where the binary does not exist, and fails with + # "Command \"puppeteer\" not found" before it reaches the package that has it. - name: Install Chrome for puppeteer - run: pnpm exec puppeteer browsers install chrome + run: pnpm --filter mermaid-export exec puppeteer browsers install chrome - name: Typecheck run: pnpm typecheck