-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Bug Description
The msteams extension declares @microsoft/agents-hosting (and related packages) as dependencies in extensions/msteams/package.json, but these are not listed in the top-level package.json.
This means every npm update -g openclaw@latest or npm install -g openclaw replaces the entire node_modules tree and removes the Teams extension dependencies as "extraneous." The Teams channel then fails to start:
Cannot find module '@microsoft/agents-hosting'
Require stack:
- /Users/.../.npm-global/lib/node_modules/openclaw/extensions/msteams/src/sdk.ts
Impact
- Teams channel silently dies after any global npm operation
- Users must manually run
cd <openclaw-install> && npm install @microsoft/agents-hostingafter every update - No error surfaced at update time — the failure only appears when Teams tries to send/receive
Reproduction
- Install openclaw globally:
npm install -g openclaw@latest - Configure the msteams channel and verify it works
- Manually install Teams deps:
cd $(npm root -g)/openclaw && npm install @microsoft/agents-hosting - Verify Teams works
- Run
npm update -g openclaw@latest(or let the built-in auto-updater do it) - Teams channel fails with
Cannot find module '@microsoft/agents-hosting'
Root Cause
extensions/msteams/package.json declares the dependency, but the top-level package.json does not. npm only installs/preserves dependencies listed in the root package.json during global installs.
Current Workaround
Post-update hook that reinstalls the Teams deps:
cd $(npm root -g)/openclaw && npm install @microsoft/agents-hostingExpected Behavior
Extension dependencies should either:
- Be declared in the top-level
package.json, or - Be installed via a post-install script, or
- Be bundled into the extension dist
Environment
- OpenClaw version: 2026.2.12
- Node: v23.11.0
- npm: 10.9.2
- OS: macOS (arm64)
- Install method:
npm install -g openclaw
Frequency
This has caused outages on three separate occasions (Feb 4, Feb 12, Feb 13, 2026) before we traced it to the npm update cycle.