Skip to content

[Bug]: MS Teams plugin fails to load - module resolution issues #23543

@Peter-Steffek

Description

@Peter-Steffek

Summary

Environment

  • Clawdbot Version: 2026.1.24-3
  • OS: Linux (Debian 13, x64)
  • Node: v22.22.0
  • Plugin: @clawdbot/msteams 2026.1.24

What we tried

  1. Installed msteams plugin via clawdbot plugins install @clawdbot/msteams
  2. Created Azure Bot (Single Tenant) with:
    • App ID, App Password, Tenant ID configured
    • Messaging endpoint set to public URL
    • Teams channel enabled
  3. Set up reverse proxy (nginx) with SSL for webhook URL
  4. Created Teams App manifest and uploaded to Teams
  5. Configured channels.msteams in clawdbot.json

What works

  • ✅ Azure Bot created and configured
  • ✅ Webhook endpoint reachable (nginx returns 200)
  • ✅ POST /api/messages requests from Microsoft BotFramework arrive (visible in nginx access logs)
  • ✅ Port 3978 was initially listening
  • [msteams] starting provider (port 3978) appeared in logs

What doesn't work

  • ❌ No "msteams inbound" messages in Clawdbot logs
  • ❌ Bot does not respond in Teams or Azure Web Chat
  • ❌ Messages are received (HTTP 200) but not processed internally

Error messages encountered

1. Duplicate plugin warning (initially)

plugin msteams: duplicate plugin id detected; later plugin may be overridden

Fixed by moving core extension to /tmp.

2. Module not found errors after reinstall

msteams failed to load: Error: Cannot find module 'proper-lockfile'

Manually installed with npm install proper-lockfile.

3. Plugin SDK resolution failure

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 
'/home/ktc-agent/.clawdbot/extensions/msteams/node_modules/clawdbot/plugin-sdk' 
imported from /home/ktc-agent/.clawdbot/extensions/msteams/index.ts

Symlink to clawdbot didn't resolve the issue.

4. Workspace protocol issue

npm error Unsupported URL Type "workspace:": workspace:*

package.json contains "clawdbot": "workspace:*" which npm doesn't support.

Configuration used

{
  "channels": {
    "msteams": {
      "enabled": true,
      "appId": "<APP_ID>",
      "appPassword": "<SECRET>",
      "tenantId": "<TENANT_ID>",
      "webhook": { "port": 3978, "path": "/api/messages" },
      "dmPolicy": "allowlist",
      "groupPolicy": "allowlist",
      "allowFrom": ["user@domain.com"]
    }
  },
  "plugins": {
    "entries": {
      "msteams": { "enabled": true }
    }
  }
}

Steps to reproduce

  1. Fresh install of clawdbot
  2. Run clawdbot plugins install @clawdbot/msteams
  3. Configure msteams channel with valid Azure Bot credentials
  4. Start gateway
  5. Send message via Teams or Azure Web Chat
  6. Observe: HTTP 200 returned but no response, no "msteams inbound" log

Expected behavior

Messages from Teams should appear as "msteams inbound" in logs and bot should respond.

Actual behavior

Expected behavior

Messages from Teams should appear as "msteams inbound" in logs and bot should respond.

Actual behavior

HTTP server receives requests and returns 200, but messages are not dispatched to the agent. Plugin fails to load properly due to module resolution issues.

Suspected cause

The plugin's package.json uses "clawdbot": "workspace:*" which is a pnpm/yarn workspace reference that npm cannot resolve. The plugin installation via clawdbot plugins install may not be handling this correctly.

OpenClaw version

2026.1.24-3

Operating system

Linux (Debian 13, x64)

Install method

v22.22.0

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

Plugin: @clawdbot/msteams 2026.1.24

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions