feat(runtime): run OpenClaw under Bun runtimes that provide node:sqlite (#114256)

* feat(runtime): allow Bun runtimes that provide node:sqlite

* fix(process): drop execa buffer encoding under Bun spawn (Bun rejects non-spawn options)

* chore(process): cite oven-sh/bun#36049 in bun spawn workaround

* docs(install): bun with node:sqlite can run openclaw; bun install workspace caveat

* fix(process): clear execa buffer encoding under Bun without mutating read-only options
This commit is contained in:
Peter Steinberger
2026-07-26 23:44:09 -04:00
committed by GitHub
parent 992a86a28f
commit a05cfd4756
6 changed files with 127 additions and 28 deletions
+12 -1
View File
@@ -49,8 +49,19 @@ const isSupportedNodeVersion = (version) => {
const ensureSupportedRuntimeVersion = () => {
if (process.versions.bun) {
// Bun >=1.4 (Rust rewrite) ships node:sqlite; feature-probe instead of
// rejecting Bun outright so capable Bun builds can run OpenClaw.
let hasNodeSqlite = false;
try {
hasNodeSqlite = Boolean(process.getBuiltinModule?.("node:sqlite"));
} catch {
hasNodeSqlite = false;
}
if (hasNodeSqlite) {
return;
}
process.stderr.write(
"openclaw: the Bun runtime is unsupported because OpenClaw requires node:sqlite.\n" +
"openclaw: this Bun runtime is unsupported because it does not provide node:sqlite.\n" +
`Use Node.js ${SUPPORTED_NODE_RANGE}; Bun remains supported for installs and package scripts.\n`,
);
process.exit(1);