mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
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:
committed by
GitHub
parent
992a86a28f
commit
a05cfd4756
+12
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user