openclaw - ✅(Solved) Fix v2026.4.7: setup-entry.js references non-existent ./src/ paths, breaks all channel plugins [1 pull requests, 4 comments, 5 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#62898Fetched 2026-04-09 08:01:05
View on GitHub
Comments
4
Participants
5
Timeline
6
Reactions
1
Timeline (top)
commented ×4closed ×1cross-referenced ×1

Error Message

Config invalid File: ~/.openclaw/openclaw.json Problem:

  • <root>: read failed: Error: bundled plugin entry "./src/channel.setup.js" failed to open from ".../dist/extensions/telegram/setup-entry.js" (resolved ".../dist/extensions/telegram/src/channel.setup.js") ENOENT: no such file or directory

Root Cause

In 2026.4.7, dist/extensions/telegram/setup-entry.js references:

  • ./src/channel.setup.js (plugin)
  • ./src/secret-contract.js (secrets)

Neither path exists in the published tarball. The src/ directory is not present under dist/extensions/telegram/.

In 2026.4.5, the same file correctly references ./channel-plugin-api.js, which exists.

This appears to be a build regression where source-tree paths leaked into the compiled dist output.

Fix Action

Workaround

Roll back to 2026.4.5:

npm install -g [email protected]
openclaw gateway restart

openclaw doctor --fix cannot fix this since the issue is in the published package files, not user config.

PR fix notes

PR #62900: fix(telegram): stop setup entry from deep-importing src

Description (problem / solution / changelog)

Summary

  • point the bundled Telegram setup entry at packaged dist-facing sidecar modules instead of missing ./src/* files
  • add focused regression coverage for loading Telegram setup sidecars from a dist-only bundled plugin layout

Change Type

  • Bug fix
  • New feature
  • Breaking change
  • Refactor
  • Docs
  • Test-only

Scope

This PR is intentionally narrow.

It only changes the bundled Telegram setup entry specifiers and adds focused regression coverage around packaged bundled-entry loading.

It does not change:

  • bundled loader fallback semantics
  • non-Telegram bundled channel entries
  • plugin update flow
  • packaging behavior outside the Telegram setup entry metadata

Linked Issue/PR

  • Related #62867
  • Related #62868
  • Related #62875
  • Related #62880
  • Related #62886
  • Related #62904
  • Related #62905
  • Related #62898
  • Related #62903
  • This PR fixes a bug or regression

Root Cause / Regression History

The bundled Telegram setup-entry.ts still referenced ./src/channel.setup.js and ./src/secret-contract.js.

That works in the source tree, but the published npm package does not ship dist/extensions/telegram/src/**. It ships the dist-facing sidecar entry modules (./channel-plugin-api.js and ./secret-contract-api.js) instead.

After upgrading to 2026.4.7, bundled setup entry resolution could therefore fail during config load / gateway startup with ENOENT while trying to open the missing ./src/... files from dist/extensions/telegram.

Behavior Changes

Before:

  • the bundled Telegram setup entry tried to load ./src/channel.setup.js
  • the bundled Telegram setup entry tried to load ./src/secret-contract.js
  • packaged npm installs could fail config load or gateway startup with a bundled plugin entry ENOENT

After:

  • the bundled Telegram setup entry loads ./channel-plugin-api.js
  • the bundled Telegram setup entry loads ./secret-contract-api.js
  • setup plugin and setup secrets sidecars resolve correctly from a dist-only bundled plugin layout

Regression Test Plan

Updated:

  • src/plugin-sdk/channel-entry-contract.test.ts

Coverage:

  • creates a temporary dist-only dist/extensions/telegram plugin root
  • verifies ./channel-plugin-api.js resolves telegramSetupPlugin
  • verifies ./secret-contract-api.js resolves channelSecrets
  • keeps the contracts boundary lane green after narrowing the fix back down to Telegram only

Repro + Verification

Observed on an installed npm-global runtime:

  • config loading and plugin update were blocked by bundled plugin entry "./src/channel.setup.js" failed to open from dist/extensions/telegram/setup-entry.js

With this patch:

  • the focused contracts boundary test still passes
  • a dist-only runtime check using loadBundledEntryExportSync(...) successfully loads both Telegram setup sidecars through the new specifiers
  • the same specifier swap applied to the installed runtime unblocked config loading and let openclaw plugins update lossless-claw proceed normally

Tests

Passed locally:

  • node scripts/run-vitest.mjs run --config vitest.contracts.config.ts src/plugins/contracts/boundary-invariants.test.ts

Additional focused coverage added in this PR:

  • loads packaged telegram setup sidecars from dist-facing api modules

Did not run full repo pre-commit:

  • local git commit hooks were slow / stuck in the broader pnpm check -> tsgo chain, so I used focused validation for this narrow fix instead

Risks and Mitigations

Risk:

  • the Telegram bundled setup entry now depends on the dist-facing facade modules being the supported packaged contract

Mitigation:

  • those facade modules are already present in packaged installs
  • the new regression test exercises a dist-only bundled plugin layout directly
  • the change is limited to Telegram setup-entry metadata and does not alter shared loader behavior

AI assistance

AI-assisted: drafted and implemented with Codex, then locally reviewed and tested by me.

Changed files

  • src/plugin-sdk/channel-entry-contract.test.ts (modified, +19/-18)

Code Example

Config invalid
File: ~/.openclaw/openclaw.json
Problem:
  - <root>: read failed: Error: bundled plugin entry "./src/channel.setup.js" failed to open
    from ".../dist/extensions/telegram/setup-entry.js"
    (resolved ".../dist/extensions/telegram/src/channel.setup.js")
    ENOENT: no such file or directory

---

npm pack openclaw@2026.4.7
tar xzf openclaw-2026.4.7.tgz
ls package/dist/extensions/telegram/src/
# -> No such file or directory
cat package/dist/extensions/telegram/setup-entry.js
# -> specifier: "./src/channel.setup.js"  (does not exist)

---

cat .../dist/extensions/telegram/setup-entry.js
# -> specifier: "./channel-plugin-api.js"  (exists, works)

---

npm install -g openclaw@2026.4.5
openclaw gateway restart
RAW_BUFFERClick to expand / collapse

Bug Report

Version

2026.4.7 (upgrading from 2026.4.5)

OS

macOS 15.4 (arm64) / Mac mini M4 Pro

What happened

After upgrading to 2026.4.7, both openclaw gateway restart and openclaw doctor --fix fail immediately with:

Config invalid
File: ~/.openclaw/openclaw.json
Problem:
  - <root>: read failed: Error: bundled plugin entry "./src/channel.setup.js" failed to open
    from ".../dist/extensions/telegram/setup-entry.js"
    (resolved ".../dist/extensions/telegram/src/channel.setup.js")
    ENOENT: no such file or directory

Gateway refuses to start. Doctor cannot run.

Root cause

In 2026.4.7, dist/extensions/telegram/setup-entry.js references:

  • ./src/channel.setup.js (plugin)
  • ./src/secret-contract.js (secrets)

Neither path exists in the published tarball. The src/ directory is not present under dist/extensions/telegram/.

In 2026.4.5, the same file correctly references ./channel-plugin-api.js, which exists.

This appears to be a build regression where source-tree paths leaked into the compiled dist output.

Scope

This affects all bundled channel plugins, not just Telegram. Every setup-entry.js and index.js under dist/extensions/*/ references ./src/ paths:

  • telegram
  • discord (bluebubbles)
  • slack
  • matrix
  • feishu
  • googlechat
  • irc
  • mattermost
  • msteams
  • nextcloud-talk
  • zalo

The error is triggered during config loading (resolveLegacyConfigForReadfindLegacyConfigIssuescollectChannelLegacyConfigRulesgetBundledChannelSetupPlugin), which runs on every config read, not just during legacy migration.

Verification

Confirmed by unpacking the published tarball:

npm pack [email protected]
tar xzf openclaw-2026.4.7.tgz
ls package/dist/extensions/telegram/src/
# -> No such file or directory
cat package/dist/extensions/telegram/setup-entry.js
# -> specifier: "./src/channel.setup.js"  (does not exist)

Compared to 2026.4.5:

cat .../dist/extensions/telegram/setup-entry.js
# -> specifier: "./channel-plugin-api.js"  (exists, works)

Workaround

Roll back to 2026.4.5:

npm install -g [email protected]
openclaw gateway restart

openclaw doctor --fix cannot fix this since the issue is in the published package files, not user config.

Related

  • #59286 — v4.1 bundled plugin deps not installed (similar class, different root cause)
  • #61686 — v4.5 npm update leaves bundled plugin runtime deps missing

Environment

  • Install method: npm global (npm install -g openclaw)
  • Node: v25.6.1
  • Shell: zsh
  • Channel configured: Telegram

extent analysis

TL;DR

Roll back to version 2026.4.5 to resolve the issue with bundled plugin paths in the openclaw package.

Guidance

  • The error is caused by a build regression where source-tree paths leaked into the compiled dist output, affecting all bundled channel plugins.
  • To verify the issue, check the setup-entry.js file in the dist/extensions/ directory for references to non-existent ./src/ paths.
  • A temporary workaround is to roll back to version 2026.4.5 using npm install -g [email protected].
  • Note that openclaw doctor --fix cannot resolve this issue as it is related to the published package files, not user configuration.

Example

No code snippet is necessary for this issue, as the solution involves rolling back to a previous version.

Notes

This issue is specific to version 2026.4.7 and is caused by a build regression. The workaround is to use a previous version until the issue is resolved.

Recommendation

Apply the workaround by rolling back to version 2026.4.5, as the issue is caused by a build regression in the published package files.

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