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/messages may 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 restart
Environment
- OpenClaw: 2026.3.24
- Express: 5.2.1
- path-to-regexp: 8.3.0
- Node: v24.14.0
Related
https://git.new/pathToRegexpError
Bug
The MS Teams plugin bundles a Bot Framework
CloudAdapterthat registers:This is valid Express 4 syntax, but Express 5 ships
path-to-regexpv8 which requires named wildcards:Where
dist/dist-B5zoW1KK.jsline ~3425 (bundled Bot Framework adapter)Fix
Replace:
With:
Impact
/api/*routes/api/messagesmay still work via exact match, but the wildcard middleware is brokenWorkaround
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
Related
https://git.new/pathToRegexpError