-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[msteams] path-to-regexp v8 breaking: /api* wildcard in Bot Framework CloudAdapter #54960
Copy link
Copy link
Closed
Closed
Copy link
Description
Bug
The MS Teams plugin bundles a Bot Framework CloudAdapter that registers:
this.express.use("/api*", express_1.default.json());This is valid Express 4 syntax, but Express 5 ships path-to-regexp v8 which requires named wildcards:
Missing parameter name at index 5: /api*; visit https://git.new/pathToRegexpError for info
Where
dist/dist-B5zoW1KK.js line ~3425 (bundled Bot Framework adapter)
Fix
Replace:
this.express.use("/api*", express_1.default.json());With:
this.express.use("/api{*path}", express_1.default.json());Impact
- Error appears in Control UI channel status for MS Teams
- JSON body parser may fail to register on
/api/*routes - Teams webhook on
/api/messagesmay still work via exact match, but the wildcard middleware is broken
Workaround
Manual patch of the bundled dist file (overwritten on update):
sudo sed -i 's|this.express.use("/api\\*", express_1.default.json())|this.express.use("/api{*path}", express_1.default.json())|' /usr/lib/node_modules/openclaw/dist/dist-B5zoW1KK.js
openclaw gateway restartEnvironment
- OpenClaw: 2026.3.24
- Express: 5.2.1
- path-to-regexp: 8.3.0
- Node: v24.14.0
Related
https://git.new/pathToRegexpError
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.