From 6c12b74cca6aef5c8d9b1d442de18119cc8a7bf6 Mon Sep 17 00:00:00 2001 From: Stefano Fiorini Date: Sun, 8 Mar 2026 21:06:57 -0500 Subject: [PATCH] Document native build step for web-automation setup --- docs/web-automation.md | 13 +++++++++++++ skills/web-automation/SKILL.md | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/docs/web-automation.md b/docs/web-automation.md index 91587d5..9084e6e 100644 --- a/docs/web-automation.md +++ b/docs/web-automation.md @@ -21,6 +21,8 @@ Automated web browsing and scraping using Playwright with Camoufox anti-detectio cd ~/.openclaw/workspace/skills/web-automation/scripts pnpm install npx camoufox-js fetch +pnpm approve-builds +pnpm rebuild better-sqlite3 esbuild ``` ## System libraries (for OpenClaw Docker builds) @@ -29,6 +31,17 @@ npx camoufox-js fetch export OPENCLAW_DOCKER_APT_PACKAGES="ffmpeg jq curl libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2" ``` +## Native module note + +If `pnpm install` warns that build scripts were ignored for native modules such as `better-sqlite3` or `esbuild`, run: + +```bash +pnpm approve-builds +pnpm rebuild better-sqlite3 esbuild +``` + +Without this, `browse.ts` and `scrape.ts` may fail before launch because the native bindings are missing. + ## Common commands ```bash diff --git a/skills/web-automation/SKILL.md b/skills/web-automation/SKILL.md index f85fb55..8a3051f 100644 --- a/skills/web-automation/SKILL.md +++ b/skills/web-automation/SKILL.md @@ -19,6 +19,8 @@ Automated web browsing and scraping using Playwright with Camoufox anti-detectio cd ~/.openclaw/workspace/skills/web-automation/scripts pnpm install npx camoufox-js fetch +pnpm approve-builds +pnpm rebuild better-sqlite3 esbuild ``` ## Prerequisite Check (MANDATORY) @@ -35,6 +37,14 @@ If any check fails, stop and return: "Missing dependency/config: web-automation requires `playwright-core` + `camoufox-js` and Camoufox-based scripts. Run setup in this skill, then retry." +If runtime fails with missing native bindings for `better-sqlite3` or `esbuild`, run: + +```bash +cd ~/.openclaw/workspace/skills/web-automation/scripts +pnpm approve-builds +pnpm rebuild better-sqlite3 esbuild +``` + ## Quick Reference - Browse page: `npx tsx browse.ts --url "https://example.com"`