openclaw - 💡(How to fix) Fix spawning of secondary startup fails. [1 comments, 1 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#61771Fetched 2026-04-08 02:54:43
View on GitHub
Comments
1
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
commented ×1

Error Message

result.error = new ErrnoException(result.error, 'spawnSync ' + options.file) Error: spawnSync C:\nvm4w\nodejs\node.exe ETIMEDOUT '  throw new Error("Source root-help module does not export renderRootHelp

RAW_BUFFERClick to expand / collapse

https://github.com/openclaw/openclaw/blob/f7068a1349af466e68ebf6b4ceaaa2ac21e9b05b/scripts/write-cli-startup-metadata.ts

The OpenClaw build process includes a script (write-cli-startup-metadata.ts) that spawns a secondary Node.js process to pre-render the command-line help text (root-help.ts). This subprocess (spawnSync) is timing out (ETIMEDOUT) before it can finish.

This timeout usually occurs on Windows when the spawned Node process gets trapped looking for a network socket or a non-existent path within the massive array of environment variables passed to it (which we can see in the spawnargs output).

[email protected] canvas:a2ui:bundle C:\ai-python\openclaw bash scripts/bundle-a2ui.sh

<DIR>/a2ui.bundle.js  chunk │ size: 486.00 kB

√ rolldown v1.0.0-rc.12 Finished in 890.36 ms

[email protected] build:plugin-sdk:dts C:\ai-python\openclaw tsc -p tsconfig.plugin-sdk.dts.json

OK: All 4 required plugin-sdk exports verified. [copy-hook-metadata] Copied 4 hook metadata files. [copy-export-html-templates] Copied 5 export-html assets. node:internal/child_process:1127     result.error = new ErrnoException(result.error, 'spawnSync ' + options.file) ;                    ^

Error: spawnSync C:\nvm4w\nodejs\node.exe ETIMEDOUT     at Object.spawnSync (node:internal/child_process:1127:20)     at spawnSync (node:child_process:911:24)     at renderSourceRootHelpText (file:///C:/ai-python/openclaw/scripts/write-cli -startup-metadata.ts:224:18)     at writeCliStartupMetadata (file:///C:/ai-python/openclaw/scripts/write-cli- startup-metadata.ts:283:20)     at async file:///C:/ai-python/openclaw/scripts/write-cli-startup-metadata.ts :305:3 {   errno: -4039,   code: 'ETIMEDOUT',   syscall: 'spawnSync C:\nvm4w\nodejs\node.exe',   path: 'C:\nvm4w\nodejs\node.exe',   spawnargs: [     '--import',     'tsx',     '--input-type=module',     '--eval',     'const mod = await import("file:///C:/ai-python/openclaw/src/cli/program/roo t-help.ts");\n' +       "if (typeof mod.renderRootHelpText !== 'function') {\n" +       '  throw new Error("Source root-help module does not export renderRootHelp Text.");\n' +       '}\n' +       'const output = await mod.renderRootHelpText({"pluginSdkResolution":"src", "config":{"agents":{"defaults":{"workspace":"C:\\ai-python\\openclaw\\.ope nclaw-build-root-help\\workspace"}},"plugins":{"loadPaths":[]}},"env":{"HOME": "C:\\ai-python\\openclaw\\.openclaw-build-root-help\\home","LOGNAME":"op enclaw-build","USER":"openclaw-build","PATH":"C:\\ai-python\\openclaw\\nod e_modules\\.bin;C:\\Users\\Desktop\\AppData\\Local\\pnpm\\.tools\ \pnpm\\10.32.1_tmp_16328\\node_modules\\pnpm\\dist\\node-gyp-bin;C:\ \ai-python\\openclaw\\node_modules\\.bin;C:\\Users\\Desktop\\AppDat a\\Local\\pnpm\\.tools\\pnpm\\10.32.1\\bin;C:\\Users\\Desktop\
\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\ usr\\local\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files \\Git\\usr\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program  Files\\Git\\usr\\bin;C:\\Users\\Desktop\\bin;C:\\Program Files (x 86)\\NVIDIA Corporation\\PhysX\\Common;C:\\ProgramData\\Oracle\\Java \\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\ \Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\WINDOWS\\S ystem32\\OpenSSH;C:\\Program Files\\PuTTY;C:\\ProgramData\\chocolatey
\\bin;C:\\Program Files\\dotnet;C:\\Program Files\\Go\\bin;C:\\Prog ram Files\\KeePassXC;C:\\Users\\Desktop\\AppData\\Local\\nvm;C:\\n vm4w\\nodejs;C:\\Program Files\\Git\\cmd;C:\\Users\\Desktop\\AppDa ta\\Local\\Programs\\Python\\Python310\\Scripts;C:\\Users\\Desktop \\AppData\\Local\\Programs\\Python\\Python310;C:\\Users\\Desktop\ \AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\JetBrains
\\PyCharm Community Edition 2019.2.4\\bin;C:\\Users\\Desktop\\AppData\ \Local\\Microsoft\\WinGet\\Links;C:\\Users\\Desktop\\AppData\\Loc al\\Programs\\Ollama;C:\\Users\\Desktop\\go\\bin;C:\\Program Files  (x86)\\Nmap;C:\\Users\\Desktop\\AppData\\Roaming\\npm;C:\\Users\ \Desktop\\AppData\\Local\\nvm;C:\\nvm4w\\nodejs;C:\\Users\\Deskto p\\.pyenv\\pyenv-win\\bin;C:\\Users\\Desktop\\.pyenv\\pyenv-win\
\shims;C:\\Program Files\\Git\\usr\\bin\\vendor_perl;C:\\Program Fil es\\Git\\usr\\bin\\core_perl","TMPDIR":"C:\\Users\\Desktop\\AppDat a\\Local\\Temp","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","TERM":"xterm","NO_COLOR ":"1","OPENCLAW_BUNDLED_PLUGINS_DIR":"C:\\ai-python\\openclaw\\dist\\ext ensions","OPENCLAW_DISABLE_BUNDLED_PLUGINS":"","OPENCLAW_DISABLE_PLUGIN_DISCOVER Y_CACHE":"1","OPENCLAW_DISABLE_PLUGIN_MANIFEST_CACHE":"1","OPENCLAW_PLUGIN_DISCO VERY_CACHE_MS":"0","OPENCLAW_PLUGIN_MANIFEST_CACHE_MS":"0","OPENCLAW_STATE_DIR": "C:\\ai-python\\openclaw\\.openclaw-build-root-help"}});\n' +       'process.stdout.write(output);\n' +       'process.exit(0);'   ] }

extent analysis

TL;DR

The likely fix is to increase the timeout value for the spawnSync function or optimize the environment variables passed to the subprocess to prevent it from getting trapped.

Guidance

  • Review the environment variables being passed to the subprocess and remove or optimize any unnecessary ones to prevent the subprocess from getting trapped.
  • Consider increasing the timeout value for the spawnSync function to give the subprocess more time to complete.
  • Verify that the root-help.ts module is correctly exporting the renderRootHelpText function and that it is not causing any delays.
  • Check the system's resource utilization and adjust the build process accordingly to prevent timeouts.

Example

No code example is provided as the issue is more related to configuration and optimization rather than a specific code fix.

Notes

The issue seems to be specific to Windows and might be related to the large number of environment variables being passed to the subprocess. Increasing the timeout value or optimizing the environment variables might help resolve the issue.

Recommendation

Apply a workaround by increasing the timeout value for the spawnSync function or optimizing the environment variables passed to the subprocess, as the root cause of the issue is not explicitly stated and might require further investigation.

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