April 27, 2026 β€’ Version: 2026.5.6

Module Hash Mismatch After npm install β€” sessions_send and web_fetch Broken

Internal module references point to outdated hashed filenames after npm install, causing ERR_MODULE_NOT_FOUND errors for sessions_send and web_fetch operations.

πŸ” Symptoms

Primary Error Manifestations

After running npm install in the OpenClaw directory, internal module resolution fails with the following error patterns:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '...\dist\manager-DzRWrKSA.js'
    at Module._resolveFilename (node:internal/modules/esm/resolve:182:9)
    at Module._resolveFilename (node:internal/modules/esm/resolve:186:7)
    at checkResolverForUnmappedModule (...\manager.js:142:17)
    at sessions_send_handler (...\sessions.js:78:12)
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '...\dist\runtime-CeGN4XUC.js'
    at Module._resolveFilename (node:internal/modules/esm/resolve:182:9)
    at Module._resolveFilename (node:internal/modules/esm/resolve:186:7)
    at web_fetch_handler (...\webtools.js:67:12)

Affected Operations

OperationError CodeFailure Point
sessions_sendERR_MODULE_NOT_FOUNDsessions.js:78 β€” checkResolverForUnmappedModule
web_fetchERR_MODULE_NOT_FOUNDwebtools.js:67 β€” fetchRuntime.resolve()
telegram_botERR_MODULE_NOT_FOUNDDependent on sessions_send
http_serverENOTDIRModule manifest points to non-existent paths

Diagnostic Command Output

$ node --version
v22.14.0

$ npm ls openclaw
└── [email protected]

$ ls dist/
manager-A1b2C3d4.js   # ← Old hash still referenced
runtime-E5f6G7h8.js   # ← Old hash still referenced
core-I9j0K1l2.js      # ← Old hash still referenced

# Expected (actual) filenames after rebuild:
manager-X9y8Z7w6.js   # ← New hash from npm install
runtime-K3m2N5p8.js   # ← New hash from npm install

Version-Specific Trigger

This regression appears after:

  • Running npm install with dependency updates
  • Platform-cross compilation triggers hash regeneration
  • Any build pipeline that modifies dist/ contents

🧠 Root Cause

Architectural Analysis

OpenClaw uses content-based hashing for compiled JavaScript modules to enable long-term caching. The build system generates filenames like [module-name]-[content-hash].js and stores a manifest mapping logical module names to hashed filenames.

Failure Sequence

Stage 1: Normal Operation (Pre-npm install)

Evidence & Sources

This troubleshooting guide was automatically synthesized by the FixClaw Intelligence Pipeline from community discussions.