openclaw - ✅(Solved) Fix [Bug]: tslog crashes gateway when missing from plugin-runtime-deps [1 pull requests, 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#72228Fetched 2026-04-27 05:32:58
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1

Error Message

  1. Make the bootstrap process block until tslog is verified installed, with a clear error message instead of a silent crash

Root Cause

The dependency graph has a gap:

  1. package.json lists tslog: ^4.10.2 as a top-level dependency, installed in /opt/homebrew/lib/node_modules/openclaw/node_modules/tslog
  2. During runtime, the loader copies core modules to plugin-runtime-deps/openclaw-<hash>/dist/
  3. The plugin runtime deps resolver creates a minimal package.json with tslog as the dependency and runs npm install
  4. If the deps install is interrupted, skipped, or the sentinel checks fail to recognize that tslog is needed, the logger module in the deps folder fails to find tslog

The plugin runtime deps sentinel system (isInstalledDependencyVersionSatisfied, hasDependencySentinel) may be failing to verify tslog is present before the first startup, allowing the gateway to start and then crash when the logger is actually imported.

Fix Action

Fix / Workaround

Current workaround

PR fix notes

PR #72493: fix(runtime-deps): stage core logger dependency

Description (problem / solution / changelog)

Fixes #72228.

Summary

  • verify mirrored package-level runtime deps include the core logger dependency (tslog)
  • make openclaw doctor --fix report and repair missing mirrored core runtime deps alongside bundled plugin deps
  • add regression coverage for both doctor detection and runtime staging when a bundled plugin has no external deps of its own

Validation

  • pnpm test -- src/plugins/bundled-runtime-deps.test.ts (passes; rerun outside sandbox because the existing tests create ~/.openclaw/plugin-runtime-deps/*)
  • pnpm lint:core
  • git diff --check
  • pnpm format:check could not run locally because oxfmt is not installed (sh: oxfmt: command not found)

Changed files

  • src/plugins/bundled-runtime-deps.test.ts (modified, +106/-0)
  • src/plugins/bundled-runtime-deps.ts (modified, +87/-16)

Code Example

import { Logger } from "tslog";

---

rm -rf ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-*/node_modules/tslog

---

openclaw gateway

---

Cannot find package 'tslog' imported from /Users/.../plugin-runtime-deps/openclaw-2026.4.24-<hash>/dist/logger-<hash>.js

---

cd ~/.openclaw/plugin-runtime-deps/openclaw-*/
npm install tslog
RAW_BUFFERClick to expand / collapse

Describe the bug

The core logger module (dist/logger-*.js) imports tslog directly:

import { Logger } from "tslog";

However, tslog is not bundled within the core package. It relies on the plugin runtime deps installer (bundled-runtime-deps.ts) to create a plugin-runtime-deps/openclaw-<version>-<hash>/package.json with tslog as its only dependency, then runs npm install to materialize it.

When this deps folder is rebuilt or partially missing, the logger module crashes with Cannot find module 'tslog', taking down the entire gateway.

This is not caused by a plugin failing -- it's the core logger module itself that requires tslog, so it should be a bundled dependency or have explicit handling, not rely on the plugin runtime deps bootstrap process.

Reproduction

  1. Delete or corrupt the tslog install:
    rm -rf ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-*/node_modules/tslog
  2. Start the gateway:
    openclaw gateway
  3. Result: channels fail to load with:
    Cannot find package 'tslog' imported from /Users/.../plugin-runtime-deps/openclaw-2026.4.24-<hash>/dist/logger-<hash>.js
    The gateway enters auto-restart loop and eventually gets EADDRINUSE.

Environment

  • OpenClaw version: 2026.4.24
  • Node.js: 22+ (Apple Silicon M1)
  • Install method: Homebrew
  • OS: macOS

Root cause analysis

The dependency graph has a gap:

  1. package.json lists tslog: ^4.10.2 as a top-level dependency, installed in /opt/homebrew/lib/node_modules/openclaw/node_modules/tslog
  2. During runtime, the loader copies core modules to plugin-runtime-deps/openclaw-<hash>/dist/
  3. The plugin runtime deps resolver creates a minimal package.json with tslog as the dependency and runs npm install
  4. If the deps install is interrupted, skipped, or the sentinel checks fail to recognize that tslog is needed, the logger module in the deps folder fails to find tslog

The plugin runtime deps sentinel system (isInstalledDependencyVersionSatisfied, hasDependencySentinel) may be failing to verify tslog is present before the first startup, allowing the gateway to start and then crash when the logger is actually imported.

Expected behavior

tslog should always be available when the core logger module runs. Two options:

  1. Include tslog as a bundled dependency that gets copied along with the core modules
  2. Make the bootstrap process block until tslog is verified installed, with a clear error message instead of a silent crash

Current workaround

Manually install tslog in the runtime deps folder:

cd ~/.openclaw/plugin-runtime-deps/openclaw-*/
npm install tslog

extent analysis

TL;DR

The core logger module's reliance on dynamically installed tslog causes crashes when the dependency is missing, and including tslog as a bundled dependency or enhancing the bootstrap process to ensure its presence can resolve the issue.

Guidance

  • Verify that tslog is correctly listed as a dependency in the top-level package.json and consider moving it to a section that ensures it's always installed with the core package.
  • Review the plugin runtime deps resolver and sentinel system to identify why tslog installation is not consistently verified before startup.
  • Consider implementing a check in the core logger module to handle the case where tslog is not found, providing a clear error message instead of crashing.
  • Evaluate the feasibility of including tslog as a bundled dependency to simplify dependency management.

Example

No code snippet is provided as the issue is more related to dependency management and build processes rather than a specific code fix.

Notes

The solution may depend on the specific requirements and constraints of the OpenClaw project, including how dependencies are managed and the role of the plugin runtime deps installer.

Recommendation

Apply a workaround by manually installing tslog in the runtime deps folder as described, while working on a long-term solution to either bundle tslog with the core package or enhance the bootstrap process to ensure its presence.

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…

FAQ

Expected behavior

tslog should always be available when the core logger module runs. Two options:

  1. Include tslog as a bundled dependency that gets copied along with the core modules
  2. Make the bootstrap process block until tslog is verified installed, with a clear error message instead of a silent crash

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 [Bug]: tslog crashes gateway when missing from plugin-runtime-deps [1 pull requests, 1 participants]