openclaw - 💡(How to fix) Fix [Bug]: v2026.4.29 gateway fails on native Windows — bundled plugin runtime deps EPERM (MAX_PATH + npm/pnpm rename) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#76194Fetched 2026-05-03 04:41:02
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
2
Timeline (top)
mentioned ×2subscribed ×2closed ×1commented ×1

After upgrading from v2026.4.27 to v2026.4.29 on native Windows 11 (Node 24.13.1, npm 11.8.0), the gateway fails to start with Gateway failed to start: Error: Startup failed: required secrets are unavailable. The real error is EPERM: operation not permitted, rename during bundled plugin runtime dependency installation — both npm and pnpm fail with EPERM on Windows-specific rename operations.

Two independent root causes compound into the failure:

Error Message

npm warn tar TAR_ENTRY_ERROR EPERM: operation not permitted, rename '<path>/node_modules/degenerator/dist/index.js' -> '<path>/node_modules/degenerator/dist/index.js.DELETE.<hash>' npm error code EPERM npm error syscall rename npm error path <path>/node_modules/node-downloader-helper/bin/ndh.1725784861 npm error The operation was rejected by your operating system. Gateway failed to start: Error: Startup failed: required secrets are unavailable.

Root Cause

Two independent root causes compound into the failure:

Fix Action

Workaround

Two-step workaround that successfully starts the gateway:

  1. Pre-install deps manually with npm (warnings are non-fatal):

    npm install --production --ignore-scripts --no-audit --no-fund --legacy-peer-deps

    (920 packages installed in ~2 minutes, EPERM warnings are non-fatal and can be ignored)

  2. Start the gateway — it detects node_modules already exists and skips the install step.

Code Example

C:\Users\<user>\.openclaw\plugin-runtime-deps\openclaw-2026.4.29-<hash>\.openclaw-pnpm-store\v10\files\<bucket>\<sha512-hash>

---

npm warn tar TAR_ENTRY_ERROR EPERM: operation not permitted, rename '<path>/node_modules/degenerator/dist/index.js' -> '<path>/node_modules/degenerator/dist/index.js.DELETE.<hash>'
npm error code EPERM
npm error syscall rename
npm error path <path>/node_modules/node-downloader-helper/bin/ndh.1725784861
npm error The operation was rejected by your operating system.
Gateway failed to start: Error: Startup failed: required secrets are unavailable.

---

WARNGET https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/<hash> error (ERR_PNPM_EPERM). Will retry in 10 seconds.
ERR_PNPM_EPERMFailed to add tarball ... to store: EPERM: operation not permitted, rename '<hash>204041' -> '<hash>'

---

npm install --production --ignore-scripts --no-audit --no-fund --legacy-peer-deps

---

// Before:
pnpmArgs: createBundledRuntimeDepsPnpmInstallArgs({ storeDir: path.join(params.installExecutionRoot, ".openclaw-pnpm-store") })
// After:
pnpmArgs: createBundledRuntimeDepsPnpmInstallArgs({ storeDir: path.join(os.homedir(), ".openclaw", "pnpm-store") })

---

const names = platform === "win32" ? ["pnpm.exe", "pnpm.cmd"] : ["pnpm"];
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Summary

After upgrading from v2026.4.27 to v2026.4.29 on native Windows 11 (Node 24.13.1, npm 11.8.0), the gateway fails to start with Gateway failed to start: Error: Startup failed: required secrets are unavailable. The real error is EPERM: operation not permitted, rename during bundled plugin runtime dependency installation — both npm and pnpm fail with EPERM on Windows-specific rename operations.

Two independent root causes compound into the failure:

Root Cause #1 — npm tar extraction EPERM

npm's internal tar module gets EPERM when renaming .DELETE.* files during node_modules extraction. Windows rename() does not overwrite existing files (unlike Unix), so when npm tries rename('index.js' -> 'index.js.DELETE.<hash>') and the target already exists from a previous attempt, it fails.

Affected paths: node_modules/degenerator/dist/index.js, socks-proxy-agent/dist/index.js, node-downloader-helper/bin/ndh, etc. — all https-proxy-agent/dist/index.js instances across nested deps.

Root Cause #2 — pnpm store MAX_PATH overflow (primary)

pnpm's store-dir is created at:

C:\Users\<user>\.openclaw\plugin-runtime-deps\openclaw-2026.4.29-<hash>\.openclaw-pnpm-store\v10\files\<bucket>\<sha512-hash>

The SHA-512 content-addressed filename is 128 hex chars. Combined with the deep mirror path, the total path is ~277 characters — exceeding Windows MAX_PATH=260. The pnpm rename of temp tarball files (<hash>204041<hash>) fails with ERR_PNPM_EPERM.

Specific failure: libsignal-node tarball from GitHub (@whiskeysockets/[email protected] dependency) consistently fails.

Environment

OpenClaw2026.4.29
Nodev24.13.1
npm11.8.0
pnpm10.33.2 (installed globally)
OSWindows 11 Pro 10.0.26200
Install methodnpm global npm i -g openclaw@latest
Windows Defender exclusionsAdded for ~/.openclaw, AppData\Roaming\npm, AppData\Local\Temp

Steps to reproduce

  1. npm i -g [email protected] on native Windows
  2. openclaw gateway start (or launch via gateway.cmd)
  3. Gateway starts staging bundled plugin runtime deps (938 packages)
  4. npm install in mirror directory fails with EPERM on node-downloader-helper/bin/ndh
  5. OR pnpm install fails with ERR_PNPM_EPERM on libsignal-node tarball store rename

Observed behavior

With npm (initial code path):

npm warn tar TAR_ENTRY_ERROR EPERM: operation not permitted, rename '<path>/node_modules/degenerator/dist/index.js' -> '<path>/node_modules/degenerator/dist/index.js.DELETE.<hash>'
npm error code EPERM
npm error syscall rename
npm error path <path>/node_modules/node-downloader-helper/bin/ndh.1725784861
npm error The operation was rejected by your operating system.
Gateway failed to start: Error: Startup failed: required secrets are unavailable.

With pnpm (after installing pnpm globally):

 WARN  GET https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/<hash> error (ERR_PNPM_EPERM). Will retry in 10 seconds.
 ERR_PNPM_EPERM  Failed to add tarball ... to store: EPERM: operation not permitted, rename '<hash>204041' -> '<hash>'

Workaround

Two-step workaround that successfully starts the gateway:

  1. Pre-install deps manually with npm (warnings are non-fatal):

    npm install --production --ignore-scripts --no-audit --no-fund --legacy-peer-deps

    (920 packages installed in ~2 minutes, EPERM warnings are non-fatal and can be ignored)

  2. Start the gateway — it detects node_modules already exists and skips the install step.

Short-term code fix suggestions

Fix #1 — Shorten pnpm store-dir path (addresses Root Cause #2)

In bundled-runtime-deps-*.js, line ~642:

// Before:
pnpmArgs: createBundledRuntimeDepsPnpmInstallArgs({ storeDir: path.join(params.installExecutionRoot, ".openclaw-pnpm-store") })
// After:
pnpmArgs: createBundledRuntimeDepsPnpmInstallArgs({ storeDir: path.join(os.homedir(), ".openclaw", "pnpm-store") })

This shortens the path from ~277 chars to ~207, preventing MAX_PATH overflow.

Fix #2 — EPERM fallback for renameSync (addresses Root Cause #1)

Existing pattern in json-file-Cq418mQ6.js:56-68 (renameJsonFileWithFallback: catch EPERM/EEXIST → copyFileSync) — same pattern needed in:

  • bundled-runtime-root-*.js: materializeBundledRuntimeMirrorFile, replaceBundledRuntimeMirrorSymlinkAtomic, copyBundledRuntimeMirrorFileAtomic
  • bundled-runtime-deps-*.js: replaceNodeModulesDir
  • shared-*.js: writeTextFileAtomic

Fix #3 — pnpm.cmd detection on Windows

resolveBundledRuntimeDepsPnpmRunner searches for pnpm.exe but not pnpm.cmd:

const names = platform === "win32" ? ["pnpm.exe", "pnpm.cmd"] : ["pnpm"];

Impact and severity

High — Gateway completely fails to start on native Windows. 20+ stability failure files generated across multiple attempts. pnpm store path issue affects every user with username longer than ~8 characters.

extent analysis

TL;DR

The most likely fix for the gateway startup issue on Windows is to apply a two-step workaround: pre-install dependencies manually with npm and then start the gateway, which detects the existing node_modules and skips the install step.

Guidance

  • To mitigate the issue, pre-install dependencies manually using npm with the command npm install --production --ignore-scripts --no-audit --no-fund --legacy-peer-deps to avoid EPERM errors.
  • Shorten the pnpm store directory path to prevent MAX_PATH overflow by modifying the storeDir path in bundled-runtime-deps-*.js as suggested in the issue.
  • Implement EPERM fallback for renameSync in the affected files (bundled-runtime-root-*.js, bundled-runtime-deps-*.js, shared-*.js) to handle rename failures.
  • Update resolveBundledRuntimeDepsPnpmRunner to detect pnpm.cmd on Windows in addition to pnpm.exe.

Example

// Before:
pnpmArgs: createBundledRuntimeDepsPnpmInstallArgs({ storeDir: path.join(params.installExecutionRoot, ".openclaw-pnpm-store") })
// After:
pnpmArgs: createBundledRuntimeDepsPnpmInstallArgs({ storeDir: path.join(os.homedir(), ".openclaw", "pnpm-store") })

Notes

The provided fixes and workarounds are based on the information given in the issue and may not be exhaustive. Further testing and verification are necessary to ensure the gateway starts correctly and functions as expected.

Recommendation

Apply the two-step workaround to pre-install dependencies manually and start the gateway, as this has been reported to successfully start the gateway. Additionally, consider implementing the suggested code fixes to address the root causes of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: v2026.4.29 gateway fails on native Windows — bundled plugin runtime deps EPERM (MAX_PATH + npm/pnpm rename) [1 comments, 2 participants]