You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: the published package cannot restore a Feishu channel — the SDK it dynamic-imports is never installed #43
@larksuiteoapi/node-sdk is a dependency of packages/local-runtime (^1.60.0), and the packaged server/runtime.js reaches it through a dynamic import, so the bundler left it external. Nothing installs it: the package ships no node_modules of its own, and the two native modules it does declare are the only things npm puts on disk.
Running the same code from the repository works, because the workspace resolves packages/local-runtime's dependencies. The published package does not, so the two forms are not equivalent. A Feishu channel that was bound in the shared data directory is loaded on every start and then fails to connect, and the WebUI's "接入 IM" feature cannot be used at all from an npm install.
Two ways to close it:
Declare it as an optional dependency of the package, so npm installs it when the channel is wanted and the startup stays cheap when it is not. The dynamic import already treats it as optional; the manifest does not.
Or bundle it.
The failure is quiet by design — the import is caught so that startup continues — which is what makes it easy to miss: the service comes up, the channel is listed in the data directory, and it never connects.
Reproduced ERR_MODULE_NOT_FOUND in an isolated npm install. PR #50 declares the Feishu SDK and verifies that the installed server can load WSClient and EventDispatcher. The package installation and real runtime startup checks pass. Closing as addressed by the submitted PR. The fix reaches npm users after merge and publication of a new version. Live Feishu reconnection was not tested.
Activity
Fectivnfy112357 commentedon Nov 20, 2026
Reproduced
ERR_MODULE_NOT_FOUNDin an isolated npm install. PR #50 declares the Feishu SDK and verifies that the installed server can loadWSClientandEventDispatcher. The package installation and real runtime startup checks pass. Closing as addressed by the submitted PR. The fix reaches npm users after merge and publication of a new version. Live Feishu reconnection was not tested.