fix: drop discord opus dependency

This commit is contained in:
Shadow
2026-03-03 12:22:16 -06:00
parent 16ebbd24b5
commit b0bcea03db
6 changed files with 27 additions and 69 deletions

View File

@@ -36,11 +36,8 @@ describe("inferUpdateFailureHints", () => {
expect(hints.join("\n")).toContain("npm config set prefix ~/.local");
});
it("returns native optional dependency hint for node-gyp/opus failures", () => {
const result = makeResult(
"global update",
"node-pre-gyp ERR!\n@discordjs/opus\nnode-gyp rebuild failed",
);
it("returns native optional dependency hint for node-gyp failures", () => {
const result = makeResult("global update", "node-pre-gyp ERR!\nnode-gyp rebuild failed");
const hints = inferUpdateFailureHints(result);
expect(hints.join("\n")).toContain("--omit=optional");
});

View File

@@ -57,12 +57,10 @@ export function inferUpdateFailureHints(result: UpdateRunResult): string[] {
if (
failedStep.name.startsWith("global update") &&
(stderr.includes("node-gyp") ||
stderr.includes("@discordjs/opus") ||
stderr.includes("prebuild"))
(stderr.includes("node-gyp") || stderr.includes("prebuild"))
) {
hints.push(
"Detected native optional dependency build failure (e.g. opus). The updater retries with --omit=optional automatically.",
"Detected native optional dependency build failure. The updater retries with --omit=optional automatically.",
);
hints.push("If it still fails: npm i -g openclaw@latest --omit=optional");
}