mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 16:10:42 +00:00
- tools/plugin: Package Entrypoints - tools/code-execution: How To Use It - tools/browser-linux-troubleshooting: Root Cause, Config Reference - install/bun: Lifecycle Scripts - nodes/audio: Mention Detection in Groups - nodes/images: Inbound Media to Commands (Pi) - platforms/android: Connection Runbook - plugins/building-plugins: Beta Release Testing - web/control-ui: Content Security Policy - security/THREAT-MODEL-ATLAS: Framework Attribution
60 lines
1.7 KiB
Markdown
60 lines
1.7 KiB
Markdown
---
|
|
summary: "Bun workflow (experimental): installs and gotchas vs pnpm"
|
|
read_when:
|
|
- You want the fastest local dev loop (bun + watch)
|
|
- You hit Bun install/patch/lifecycle script issues
|
|
title: "Bun (experimental)"
|
|
---
|
|
|
|
<Warning>
|
|
Bun is **not recommended for gateway runtime** (known issues with WhatsApp and Telegram). Use Node for production.
|
|
</Warning>
|
|
|
|
Bun is an optional local runtime for running TypeScript directly (`bun run ...`, `bun --watch ...`). The default package manager remains `pnpm`, which is fully supported and used by docs tooling. Bun cannot use `pnpm-lock.yaml` and will ignore it.
|
|
|
|
## Install
|
|
|
|
<Steps>
|
|
<Step title="Install dependencies">
|
|
```sh
|
|
bun install
|
|
```
|
|
|
|
`bun.lock` / `bun.lockb` are gitignored, so there is no repo churn. To skip lockfile writes entirely:
|
|
|
|
```sh
|
|
bun install --no-save
|
|
```
|
|
|
|
</Step>
|
|
<Step title="Build and test">
|
|
```sh
|
|
bun run build
|
|
bun run vitest run
|
|
```
|
|
</Step>
|
|
</Steps>
|
|
|
|
## Lifecycle scripts
|
|
|
|
Bun blocks dependency lifecycle scripts unless explicitly trusted. For this repo, the commonly blocked scripts are not required:
|
|
|
|
- `@whiskeysockets/baileys` `preinstall` -- checks Node major >= 20 (OpenClaw defaults to Node 24 and still supports Node 22 LTS, currently `22.14+`)
|
|
- `protobufjs` `postinstall` -- emits warnings about incompatible version schemes (no build artifacts)
|
|
|
|
If you hit a runtime issue that requires these scripts, trust them explicitly:
|
|
|
|
```sh
|
|
bun pm trust @whiskeysockets/baileys protobufjs
|
|
```
|
|
|
|
## Caveats
|
|
|
|
Some scripts still hardcode pnpm (for example `docs:build`, `ui:*`, `protocol:check`). Run those via pnpm for now.
|
|
|
|
## Related
|
|
|
|
- [Install overview](/install)
|
|
- [Node.js](/install/node)
|
|
- [Updating](/install/updating)
|