openclaw - 💡(How to fix) Fix v2026.4.8 dist imports 11 modules not declared in package.json dependencies [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63103Fetched 2026-04-09 07:58:31
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
closed ×1commented ×1cross-referenced ×1

Fresh install of [email protected] via npm i -g openclaw produces a gateway that crashes on startup with ERR_MODULE_NOT_FOUND for several modules that are imported by dist/ but are missing from package.json dependencies.

Root Cause

Fresh install of [email protected] via npm i -g openclaw produces a gateway that crashes on startup with ERR_MODULE_NOT_FOUND for several modules that are imported by dist/ but are missing from package.json dependencies.

RAW_BUFFERClick to expand / collapse

Summary

Fresh install of [email protected] via npm i -g openclaw produces a gateway that crashes on startup with ERR_MODULE_NOT_FOUND for several modules that are imported by dist/ but are missing from package.json dependencies.

Repro

  1. npm i -g [email protected]
  2. openclaw gateway --port 18789
  3. Crash on startup. First missing: @larksuiteoapi/node-sdk. After installing it, next missing surfaces, and so on.

Modules missing from dependencies (full list found by chasing crashes one by one)

  • @slack/web-api
  • @slack/bolt
  • @grammyjs/runner
  • @larksuiteoapi/node-sdk
  • @lancedb/lancedb
  • @google/genai
  • openai
  • link-preview-js
  • ioredis
  • redis
  • google-auth-library

After npm install --no-save of all 11 in the global module dir, the gateway boots cleanly and serves HTTP 200 on port 18789. So the runtime code works — only the package manifest is incomplete.

Suggested fix

Either move these from devDependencies / peerDependencies / optionalDependencies (wherever they currently live) into dependencies, or mark the integrations as optional with proper dynamic-import guards so absence doesn't crash the gateway.

Environment

  • Windows Server 2025, Node 20.x
  • openclaw 2026.4.8 (global install via npm)

extent analysis

TL;DR

The most likely fix is to move the missing modules from devDependencies, peerDependencies, or optionalDependencies to dependencies in the package.json file.

Guidance

  • Verify the current location of the missing modules in the package.json file to determine the correct course of action.
  • Move the missing modules to dependencies if they are required for the gateway to function properly.
  • Consider adding dynamic-import guards for optional integrations to prevent crashes when dependencies are missing.
  • Test the gateway after updating the package.json file to ensure it boots cleanly and serves HTTP 200 on the specified port.

Example

No code snippet is provided as the issue is related to package dependencies rather than code implementation.

Notes

The fix may not apply if the missing modules are not required for the gateway to function properly, or if there are other underlying issues with the package dependencies.

Recommendation

Apply workaround: Move the missing modules to dependencies in the package.json file, as this is the most straightforward solution to resolve the ERR_MODULE_NOT_FOUND error and ensure the gateway functions as expected.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING