Document native build step for web-automation setup
This commit is contained in:
@@ -21,6 +21,8 @@ Automated web browsing and scraping using Playwright with Camoufox anti-detectio
|
|||||||
cd ~/.openclaw/workspace/skills/web-automation/scripts
|
cd ~/.openclaw/workspace/skills/web-automation/scripts
|
||||||
pnpm install
|
pnpm install
|
||||||
npx camoufox-js fetch
|
npx camoufox-js fetch
|
||||||
|
pnpm approve-builds
|
||||||
|
pnpm rebuild better-sqlite3 esbuild
|
||||||
```
|
```
|
||||||
|
|
||||||
## System libraries (for OpenClaw Docker builds)
|
## 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"
|
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
|
## Common commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ Automated web browsing and scraping using Playwright with Camoufox anti-detectio
|
|||||||
cd ~/.openclaw/workspace/skills/web-automation/scripts
|
cd ~/.openclaw/workspace/skills/web-automation/scripts
|
||||||
pnpm install
|
pnpm install
|
||||||
npx camoufox-js fetch
|
npx camoufox-js fetch
|
||||||
|
pnpm approve-builds
|
||||||
|
pnpm rebuild better-sqlite3 esbuild
|
||||||
```
|
```
|
||||||
|
|
||||||
## Prerequisite Check (MANDATORY)
|
## 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."
|
"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
|
## Quick Reference
|
||||||
|
|
||||||
- Browse page: `npx tsx browse.ts --url "https://example.com"`
|
- Browse page: `npx tsx browse.ts --url "https://example.com"`
|
||||||
|
|||||||
Reference in New Issue
Block a user