← Home

Troubleshooting Guide

Fix “Cannot find module '@larksuiteoapi/node-sdk'” in OpenClaw

OpenClaw throws Cannot find module '@larksuiteoapi/node-sdk' when the Feishu / Lark channel plugin tries to load without the Lark (Feishu) SDK installed. Here is exactly why it happens and how to fix it, whether you are self-hosting or using OpenClaw Launch.

The Error

You will see a stack trace in your OpenClaw container logs that looks like this:

Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- /app/node_modules/@openclaw/feishu/dist/index.js
- /app/dist/plugins/loader.js
    at Module._resolveFilename (node:internal/modules/cjs/loader)
    at Module._load (node:internal/modules/cjs/loader)
    ...

The error also commonly appears in the gateway UI as a red banner reading plugin feishu failed to load: Cannot find module '@larksuiteoapi/node-sdk', and in bot responses as a generic “plugin not ready” reply.

Why This Happens

@larksuiteoapi/node-sdk is the official Lark / Feishu JavaScript SDK published by ByteDance. The OpenClaw Feishu channel plugin (@openclaw/feishu) depends on it at runtime. The error means the Feishu plugin entry point was loaded but its SDK dependency is missing from node_modules.

There are three situations that typically produce this error:

  1. Feishu channel enabled before the plugin package is installed. You set channels.feishu.enabled: true and plugins.entries.feishu.enabled: true in openclaw.json, but never ran node openclaw.mjs plugins install @openclaw/feishu.
  2. Plugin directory was wiped. A rebuild, a fresh volume, or a docker run without mounting /app/node_modules removed the SDK. The Feishu config still references the plugin, but the files are gone.
  3. On-demand install did not complete. On managed platforms that install the Feishu plugin only when you open the Connect Feishu flow, the install step failed partway (usually a transient npm registry timeout), leaving the plugin entry half-written without the SDK on disk.
Important: @openclaw/feishu does not bundle @larksuiteoapi/node-sdk. The SDK is installed alongside the plugin and can be updated independently. This means enabling the Feishu plugin in configuration is not the same as installing it — the npm install step is separate.

Quick Fix (Self-Hosted)

If you are running OpenClaw yourself via Docker or npm, use the OpenClaw plugin installer. It resolves both the plugin and its SDK dependency in one step:

# From inside the OpenClaw container
docker exec -it openclaw sh -c "cd /app && node openclaw.mjs plugins install @openclaw/feishu"

# Or, if you run OpenClaw directly from source
cd /path/to/openclaw
node openclaw.mjs plugins install @openclaw/feishu

If you need to install via raw npm instead (for example inside a locked-down image where openclaw.mjs is not on PATH), install both packages in the same command so npm resolves them together:

docker exec -it openclaw sh -c "cd /app && npm install @openclaw/feishu @larksuiteoapi/node-sdk"

Then reload the gateway so it picks up the new plugin:

docker exec openclaw sh -c "kill -SIGUSR1 1"
# or simply restart the container
docker restart openclaw

Tail the logs while the gateway restarts to confirm the Feishu plugin registers cleanly:

docker logs -f openclaw | grep -i feishu

A successful load prints something like plugin feishu registered (channels: feishu) with no stack trace.

Quick Fix (OpenClaw Launch)

On OpenClaw Launch, the Feishu plugin is install-on-demand: the install starts the moment you open the Connect Feishu modal on your dashboard and runs in the background (about 30–60 seconds) while you paste your credentials. If you see this error, the install kicked off in that modal did not finish. To fix it:

  1. Open your Dashboard and find the instance that is failing.
  2. Close the Connect Feishu modal entirely and reopen it from the dashboard. The install only triggers when the modal opens fresh — clicking Connect again inside the same modal just re-awaits the previous (failed) attempt and will not start a new install.
  3. Wait for the install status inside the reopened modal to reach ready before pasting your Feishu App ID and App Secret. If the install indicator stays in the error state, reload the dashboard and reopen the modal one more time.

If it still fails, the install logs are captured server-side — email [email protected] and we will re-run the install for your instance.

Verifying the Install Worked

From inside the container, confirm both packages are present on disk:

docker exec openclaw sh -c "ls /app/node_modules/@larksuiteoapi/node-sdk/package.json"
docker exec openclaw sh -c "ls /app/node_modules/@openclaw/feishu/package.json"
docker exec openclaw sh -c "cd /app && npm ls @openclaw/feishu @larksuiteoapi/node-sdk"

If npm ls shows UNMET DEPENDENCY or extraneous, reinstall both packages together rather than one at a time — npm's dependency resolver will otherwise hoist conflicting versions.

Common Follow-Up Problems

Plugin Installs but Feishu Webhook Returns 401

The SDK loads but Feishu rejects the webhook: you are past this error but now hitting a Feishu app-credentials issue. Check channels.feishu.accounts.main.appId and channels.feishu.accounts.main.appSecret in openclaw.json against the values in the Lark Open Platform. App credentials changes require a gateway restart to take effect.

“Cannot find module” Returns After Every Restart

@larksuiteoapi/node-sdk installs fine, but the error comes back after the next docker restart or host reboot. This means /app/node_modules is not being persisted. Fix the mount:

# Bad: node_modules lost on restart
docker run openclaw

# Good: mount node_modules to a named volume
docker run -v openclaw-node-modules:/app/node_modules openclaw

Same Error for openclaw-weixin / WeChat

The WeChat plugin (openclaw-weixin) follows the same install-on-demand pattern. If you see a similar “Cannot find module” error from a WeChat plugin path, see our OpenClaw WeChat setup guide.

The Easy Way: Use OpenClaw Launch

Figuring out which plugin needs which peer dependency, mounting node_modules so it survives restarts, and handling npm registry timeouts is fiddly. On OpenClaw Launch, you click Connect next to Feishu on your dashboard and the platform does the install, the SDK dependency, and the gateway reload for you.

Self-Hosted (DIY)OpenClaw Launch
Feishu plugin installnode openclaw.mjs plugins install @openclaw/feishuOne-click Connect from dashboard
SDK dependencyInstall manually, keep in syncHandled automatically
Persisting node_modulesConfigure Docker volumeHandled automatically
Webhook URLBuild the URL yourselfShown in the UI, ready to paste
Cost$5–20/mo (VPS) + timeFrom $3/mo

Frequently Asked Questions

What is @larksuiteoapi/node-sdk?

@larksuiteoapi/node-sdk is the official Lark / Feishu JavaScript SDK published by ByteDance on npm. OpenClaw's Feishu channel plugin (@openclaw/feishu) uses it to call Feishu APIs for sending messages, handling events, and verifying webhook signatures. The SDK is installed alongside the plugin rather than bundled into it, so its version can be updated independently.

Why does installing @openclaw/feishu not also install the SDK automatically?

Using node openclaw.mjs plugins install @openclaw/feishu installs both together — that is the recommended path. If you install via raw npm instead, older npm versions may not auto-install the SDK because of how the package declares the dependency. The safe install command is npm install @openclaw/feishu @larksuiteoapi/node-sdk in one step so npm resolves both in the same tree.

Can I ignore this error if I do not use Feishu?

Yes, but only by disabling both the plugin entry and the channel, not by ignoring the log. Remove (or set enabled: false on) both plugins.entries.feishu and channels.feishu in openclaw.json, then restart the gateway. Leaving a channels.feishu stub with the plugin uninstalled will cause OpenClaw to reject the config with an “unknown channel id” error.

Does this error affect Telegram, Discord, WhatsApp, or WeChat channels?

No — this specific error is unique to the Feishu / Lark plugin. Each OpenClaw channel plugin has its own peer dependencies. A missing-module error for a different channel will name a different package (for example telegraf for Telegram or discord.js for Discord). The fix pattern is the same: install the missing package inside the container and reload the gateway.

Related Guides

Skip the Plugin Install

No npm peer-dependency tracking. No missing SDK errors. Connect Feishu from your dashboard in one click.

Deploy with OpenClaw Launch