openclaw - 💡(How to fix) Fix Library embedders: document 4.14→4.21 extension-deps refactor, and consider standard npm semantics for the remaining ~400 MB [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#70083Fetched 2026-04-23 07:29:33
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
closed ×1commented ×1
RAW_BUFFERClick to expand / collapse

Bundle size & extension-deps refactor

Fresh npm install size on linux-x64, node 22:

versioninstall sizedirect deps
2026.4.142.1 GB71
2026.4.21414 MB42

The 29 deps dropped at 4.21 are channel SDKs (Slack/Discord/Matrix/Line/WhatsApp/Telegram/Lark/Bedrock/Google/Nostr + audio / lancedb / playwright / jimp). dist/extensions/<name>/package.json declares each extension's deps; scripts/postinstall-bundled-plugins.mjs skips installing them unless OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS=1. Right design for library embedders, but undocumented — no CHANGELOG note, and an existing 4.14 install of e.g. the Slack channel silently breaks on upgrade until openclaw doctor --fix.

Asks

  1. CHANGELOG entry + short migration doc for 4.14→4.21 (the env var, doctor --fix, the lazy-install contract).
  2. Consider optionalDependencies / peerDependenciesMeta.*.optional so the semantics are legible to electron-builder / pnpm --prod / npm ci --omit=optional.
  3. (pi-ai upstream) @mistralai / @google / @aws-sdk + extra @anthropic-ai packages still come in transitively via @mariozechner/pi-ai for embedders using only an openai-compat proxy — ~50 MB.

Happy to PR #1 or #2.

extent analysis

TL;DR

To address the bundle size issue and extension dependencies refactor, consider adding a CHANGELOG entry and migration documentation for the OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS environment variable and the openclaw doctor --fix command.

Guidance

  • Review the scripts/postinstall-bundled-plugins.mjs script to understand how the OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS environment variable affects the installation of extension dependencies.
  • Investigate using optionalDependencies or peerDependenciesMeta.*.optional to make the semantics of the lazy-install contract more legible to tools like electron-builder, pnpm, and npm ci.
  • Analyze the transitive dependencies of @mariozechner/pi-ai to identify opportunities to reduce the bundle size by ~50 MB.

Example

No code snippet is provided as the issue does not contain specific code that needs to be modified.

Notes

The issue lacks information about the specific requirements and constraints of the project, so the guidance provided is general and may need to be adapted to the specific use case.

Recommendation

Apply workaround: Add a CHANGELOG entry and migration documentation to inform users about the OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS environment variable and the openclaw doctor --fix command, as this will help users understand the changes and mitigate potential issues.

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 Library embedders: document 4.14→4.21 extension-deps refactor, and consider standard npm semantics for the remaining ~400 MB [1 comments, 1 participants]