惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
IT之家
IT之家
Google DeepMind News
Google DeepMind News
D
Docker
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
月光博客
月光博客
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: stage npm updates under global root · openclaw/openc...
shakkernerd · 2026-04-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -66,6 +66,16 @@ describe("inferUpdateFailureHints", () => {

6666

expect(hints.join("\n")).toContain("npm config set prefix ~/.local");

6767

});

6868
69+

it("returns EACCES hint for staged package permission failures", () => {

70+

const result = makeResult(

71+

"global install stage",

72+

"EACCES: permission denied, mkdtemp '/usr/local/lib/node_modules/.openclaw-update-stage-'",

73+

);

74+

const hints = inferUpdateFailureHints(result);

75+

expect(hints.join("\n")).toContain("EACCES");

76+

expect(hints.join("\n")).toContain("npm config set prefix ~/.local");

77+

});

78+
6979

it("returns native optional dependency hint for node-gyp failures", () => {

7080

const result = makeResult("global update", "node-pre-gyp ERR!\nnode-gyp rebuild failed");

7181

const hints = inferUpdateFailureHints(result);

Original file line numberDiff line numberDiff line change

@@ -78,8 +78,10 @@ export function inferUpdateFailureHints(result: UpdateRunResult): string[] {

7878
7979

const stderr = normalizeLowercaseStringOrEmpty(failedStep.stderrTail);

8080

const hints: string[] = [];

81+

const isGlobalPackageInstallStep =

82+

failedStep.name.startsWith("global update") || failedStep.name.startsWith("global install");

8183
82-

if (failedStep.name.startsWith("global update") && stderr.includes("eacces")) {

84+

if (isGlobalPackageInstallStep && stderr.includes("eacces")) {

8385

hints.push(

8486

"Detected permission failure (EACCES). Re-run with a writable global prefix or sudo (for system-managed Node installs).",

8587

);

Original file line numberDiff line numberDiff line change

@@ -66,6 +66,7 @@ describe("runGlobalPackageUpdateSteps", () => {

6666

if (!stagePrefix) {

6767

throw new Error("missing staged prefix");

6868

}

69+

expect(path.dirname(stagePrefix)).toBe(globalRoot);

6970

await writePackageRoot(

7071

path.join(stagePrefix, "lib", "node_modules", "openclaw"),

7172

"2.0.0",

Original file line numberDiff line numberDiff line change

@@ -62,7 +62,8 @@ async function createStagedNpmInstall(

6262

if (!targetLayout) {

6363

return null;

6464

}

65-

const prefix = await fs.mkdtemp(path.join(targetLayout.prefix, ".openclaw-update-stage-"));

65+

await fs.mkdir(targetLayout.globalRoot, { recursive: true });

66+

const prefix = await fs.mkdtemp(path.join(targetLayout.globalRoot, ".openclaw-update-stage-"));

6667

const layout = resolveNpmGlobalPrefixLayoutFromPrefix(prefix);

6768

return {

6869

prefix,