-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Plugin installs crash Express 4.x routes: core npm-shrinkwrap pins [email protected] but no central override covers plugins #95894
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
OpenClaw's
npm-shrinkwrap.jsonpinspath-to-regexpto^8.xglobally. Express 4.x requirespath-to-regexp@~0.1.x. Plugins built on Express 4.x must individually declare"overrides": {"path-to-regexp": "~0.1.12"}in their ownpackage.jsonto avoid a startup crash. If that override is missing,express.Router()throwsSyntaxErrorat load and all HTTP routes in the plugin fail.The root cause is that OpenClaw core has no central override covering plugins. Prior fixes patched individual plugins (symptoms), not the mechanism.
Reproduction steps
"overrides": {"path-to-regexp": "~0.1.12"}in itspackage.json.SyntaxError: Invalid regular expression: /^\/(?:([^\/]+?))\/?\/?/uAdding the
overridesblock to the plugin'spackage.jsonand reinstalling resolves the crash.Expected behavior
OpenClaw core ensures plugins built on Express 4.x receive a compatible
path-to-regexpversion without requiring each plugin author to manually add overrides.Actual behavior
Every Express 4.x plugin must independently declare its own
path-to-regexpoverride. The failure mode is silent on install and only manifests at runtime when routes are first accessed.Proposed fix / approach
Option A (preferred): Add a top-level
overrides.path-to-regexpentry in OpenClaw's corenpm-shrinkwrap.jsonorpackage.jsonthat resolves Express 4.x's~0.1.xrange for the entire install tree. This removes the per-plugin requirement entirely.Option B: Add a plugin validator that detects Express 4.x dependencies and emits a clear error pointing to the required override if it is absent.
The current per-plugin workaround is the community-documented fallback, not a fix.
Context
@askjo/[email protected]