openclaw - 💡(How to fix) Fix Bundled runtime deps cache reports 1 missing for chokidar on every restart [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#75149Fetched 2026-05-01 05:37:43
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

Root Cause

Root cause: chokidar@^5.0.0 is declared in openclaw's own package.json as a bundled runtime dep but is not in the cached package.json manifest at ~/.openclaw/plugin-runtime-deps/<hash>/package.json. The detection logic scans node_modules and finds chokidar present, but the manifest only lists the 30 explicit top-level deps. The ensureNpmInstallExecutionManifest function writes only installSpecs (the explicit deps) to the manifest — it never records transitive deps that npm auto-installed. This causes chokidar to be re-flagged as missing on every restart, wasting ~4-5 seconds per restart.

RAW_BUFFERClick to expand / collapse

On every gateway restart, the following log appears:

[plugins] staging bundled runtime deps before gateway startup (1 missing, 30 install specs): chokidar@^5.0.0 [plugins] installed bundled runtime deps before gateway startup in ~4s: chokidar@^5.0.0

Root cause: chokidar@^5.0.0 is declared in openclaw's own package.json as a bundled runtime dep but is not in the cached package.json manifest at ~/.openclaw/plugin-runtime-deps/<hash>/package.json. The detection logic scans node_modules and finds chokidar present, but the manifest only lists the 30 explicit top-level deps. The ensureNpmInstallExecutionManifest function writes only installSpecs (the explicit deps) to the manifest — it never records transitive deps that npm auto-installed. This causes chokidar to be re-flagged as missing on every restart, wasting ~4-5 seconds per restart.

Suggested fix: Either record all actually-installed deps in the manifest (not just installSpecs), or update the missing detection to not flag deps already present in node_modules as missing just because they are absent from the manifest.

extent analysis

TL;DR

Update the ensureNpmInstallExecutionManifest function to record all actually-installed dependencies in the manifest, including transitive dependencies.

Guidance

  • Modify the ensureNpmInstallExecutionManifest function to write all installed dependencies to the manifest, not just the explicit top-level dependencies (installSpecs).
  • Alternatively, update the missing detection logic to ignore dependencies that are present in node_modules but absent from the manifest.
  • Verify the fix by checking the manifest file at ~/.openclaw/plugin-runtime-deps/<hash>/package.json to ensure it includes all installed dependencies, including transitive ones like chokidar.
  • Test the gateway restart to confirm the log message about the missing dependency is no longer appearing.

Example

No code snippet is provided as the issue does not include the specific code for the ensureNpmInstallExecutionManifest function or the missing detection logic.

Notes

This fix assumes that updating the manifest to include all installed dependencies or modifying the detection logic to account for dependencies in node_modules will resolve the issue. However, the actual implementation details may vary based on the specific requirements and constraints of the project.

Recommendation

Apply the workaround by updating the ensureNpmInstallExecutionManifest function to include all installed dependencies in the manifest, as this directly addresses the identified root cause 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 Bundled runtime deps cache reports 1 missing for chokidar on every restart [1 comments, 2 participants]