openclaw - ✅(Solved) Fix [2026.4.29] Bundled runtime deps staging fails under launchd/systemd: ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY [1 pull requests, 2 comments, 3 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#75735Fetched 2026-05-02 05:31:03
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
3
Timeline (top)
commented ×2closed ×1cross-referenced ×1

Error Message

[plugins] failed to stage bundled runtime deps before gateway startup after 181ms; gateway startup will continue with per-plugin runtime-deps installs: Error: ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY Aborted removal of modules directory due to no TTY

Root Cause

Likely the same root cause fires under systemd and Windows Services as well.

Fix Action

Fix / Workaround

Workaround: add export CI='1' to ~/.openclaw/service-env/ai.openclaw.gateway.env, then bootout + bootstrap.

PR fix notes

PR #75751: Fix/missing plugin deps

Description (problem / solution / changelog)

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: Several OpenClaw plugins (acpx, discord, nostr, slack, telegram) were missing explicit json5 and jiti dependencies in their package.json files. This could lead to runtime errors when these plugins were loaded or executed, as these packages were implicitly required but not declared.
  • Why it matters: The missing dependencies cause instability and potential failures in core plugin functionality, hindering the reliability of OpenClaw extensions.
  • What changed: Added json5 (version ^2.2.3) and jiti (version ^2.6.1) as direct dependencies to the package.json files of the acpx, discord, nostr, slack, and telegram extensions. Minor version adjustments for other dependencies (e.g., @agentclientprotocol/claude-agent-acp, typebox, zod) were also included to maintain compatibility and stability within these extensions.
  • What did NOT change (scope boundary): No core OpenClaw application logic or unrelated feature implementations were altered. The changes are strictly confined to dependency declarations and minor related version bumps within specific plugin package.json files, along with some exports in Nostr and a test description update in Slack.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens (Minor dependency version change in discord, may affect auth)
  • Memory / storage
  • Integrations (Affected plugins: acpx, discord, nostr, slack, telegram)
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #
  • This PR fixes a bug or regression (Implicitly, as no specific issue was linked)

Root Cause (if applicable)

For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write N/A. If the cause is unclear, write Unknown.

  • Root cause: Undocumented or undeclared transitive dependencies (json5, jiti) were relied upon by the plugins, leading to runtime failures when the environment did not provide them. This indicates an oversight in the initial dependency auditing for these extensions.
  • Missing detection / guardrail: Lack of automated dependency analysis or a more robust build-time check to ensure all runtime dependencies are explicitly listed in package.json.
  • Contributing context (if known): Unknown, but likely due to the modular nature of extensions and evolving dependency trees.

Regression Test Plan (if applicable)

For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write N/A.

  • Coverage level that should have caught this:
    • Unit test (Specifically, unit tests for each plugin that rely on json5 or jiti would fail without these dependencies.)
    • Seam / integration test (Integration tests for the affected plugins would likely expose the runtime errors.)
    • End-to-end test
    • Existing coverage already sufficient (Unlikely, given the problem)
  • Target test or file: pnpm test:extension acpx, pnpm test:extension discord, pnpm test:extension nostr, pnpm test:extension slack, pnpm test:extension telegram.
  • Scenario the test should lock in: Each plugin should load and initialize successfully without throwing errors related to missing json5 or jiti modules.
  • Why this is the smallest reliable guardrail: Unit and integration tests for each plugin directly exercise the code paths that would require these dependencies, ensuring they are present at runtime.
  • Existing test that already covers this (if any): Unclear without running the tests, but the fix suggests previous coverage was insufficient for this specific dependency issue.
  • If no new test is added, why not: This PR focuses on fixing the dependency declaration. While new dedicated tests for dependency presence would be ideal, existing functional tests for each plugin should now pass with the dependencies correctly declared.

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

None. This is a stability fix; users should only observe a reduction in plugin-related errors.

Diagram (if applicable)

For UI changes or non-trivial logic flows, include a small ASCII diagram reviewers can scan quickly. Otherwise write N/A.

N/A

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: Linux
  • Runtime/container: Node.js (local OpenClaw instance)
  • Model/provider: N/A (plugin dependency fix)
  • Integration/channel (if any): acpx, discord, nostr, slack, telegram
  • Relevant config (redacted): N/A

Steps

  1. Clone the openclaw/openclaw repository.
  2. Checkout the main branch.
  3. Attempt to use any of the affected plugins (e.g., acpx, discord, nostr, slack, telegram) in an OpenClaw instance before applying this PR. Observe potential errors related to missing json5 or jiti modules.
  4. Apply the changes from this PR.
  5. Rebuild and restart the OpenClaw instance.
  6. Attempt to use the affected plugins again.

Expected

  • Plugins should load and function correctly without errors related to missing json5 or jiti dependencies.

Actual

  • Before the fix, errors related to missing json5 or jiti modules would occur.
  • After the fix, these errors should be resolved, and the plugins should operate as expected.

Evidence

Attach at least one:

  • Failing test/log before + passing after (Implicit: logs showing module not found errors before the PR, and absence of such errors after)
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: Checked package.json files to confirm addition of json5 and jiti in affected extensions. Reviewed git diff to ensure changes are limited to dependency updates and minor related adjustments.
  • Edge cases checked: Confirmed that version bumps for other dependencies are minor and compatible.
  • What you did not verify: Full runtime execution of all affected plugins in a live OpenClaw environment, as this is a simulated interaction.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: Minor version bumps of other dependencies could introduce subtle, unforeseen incompatibilities, although they appear to be patch-level changes.
    • Mitigation: Thorough CI testing and targeted manual verification of the affected plugins after the PR is merged.

Changed files

  • extensions/acpx/package.json (modified, +4/-2)
  • extensions/discord/package.json (modified, +5/-3)
  • extensions/nostr/package.json (modified, +3/-1)
  • extensions/slack/package.json (modified, +3/-1)
  • extensions/telegram/package.json (modified, +4/-2)

Code Example

[plugins] failed to stage bundled runtime deps before gateway startup after 181ms;
  gateway startup will continue with per-plugin runtime-deps installs:
  Error: ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY
  Aborted removal of modules directory due to no TTY
RAW_BUFFERClick to expand / collapse

When the gateway is run via launchd (or any non-TTY service manager), prestageGatewayBundledRuntimeDeps and the per-plugin staging step both fail immediately:

[plugins] failed to stage bundled runtime deps before gateway startup after 181ms;
  gateway startup will continue with per-plugin runtime-deps installs:
  Error: ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY
  Aborted removal of modules directory due to no TTY

Result: 6 of 9 plugins fail to come up (acpx, browser, feishu, file-transfer, memory-core, telegram). Only the three with no runtime-deps requirements (device-pair, phone-control, talk-voice) start. The "fall back to per-plugin installs" path also fails for the same reason.

This is pnpm's safety check (it refuses to wipe node_modules when stdin isn't a TTY, to protect CI environments from accidental damage). It's controllable via CI=true env or --config.confirm-modules-purge=false.

Workaround: add export CI='1' to ~/.openclaw/service-env/ai.openclaw.gateway.env, then bootout + bootstrap.

Suggested fix: in createBundledRuntimeDepsInstallEnv (bundled-runtime-deps-Dj2QXhNg.js), inject CI: '1' (or the equivalent pnpm config flag) when staging — these are internal installs, never interactive, so the safeguard adds no value.

Repro: install OpenClaw, set up the gateway plist via openclaw service install (or equivalent), check /tmp/openclaw/openclaw-*.log after first start.

Environment: macOS 25.4.0 / launchd, Node v25.5.0, pnpm 10.x bundled via OpenClaw, openclaw 2026.4.29.

Likely the same root cause fires under systemd and Windows Services as well.

extent analysis

TL;DR

Set the CI environment variable to 1 to bypass pnpm's safety check when staging bundled runtime dependencies.

Guidance

  • To fix the issue, inject CI: '1' into the createBundledRuntimeDepsInstallEnv function in bundled-runtime-deps-Dj2QXhNg.js to disable pnpm's safeguard.
  • As a temporary workaround, add export CI='1' to ~/.openclaw/service-env/ai.openclaw.gateway.env and then run bootout + bootstrap.
  • Verify the fix by checking the gateway logs at /tmp/openclaw/openclaw-*.log after the first start.
  • This solution should also apply to similar issues under systemd and Windows Services.

Example

No code snippet is provided as the necessary changes are clearly described in the issue.

Notes

The provided solution assumes that the CI environment variable is the correct way to disable pnpm's safety check in this context. If this is not the case, further investigation may be necessary.

Recommendation

Apply the workaround by setting CI to 1 as it is a simple and effective solution to the problem, and it is likely that this will be the recommended fix until a more permanent solution is implemented.

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 - ✅(Solved) Fix [2026.4.29] Bundled runtime deps staging fails under launchd/systemd: ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY [1 pull requests, 2 comments, 3 participants]