fix: drop discord opus dependency
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user