openclaw - 💡(How to fix) Fix [Bug]: openclaw doctor --fix fails with MODULE_NOT_FOUND for openclaw.mjs [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#77786Fetched 2026-05-06 06:21:28
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
2
Timeline (top)
labeled ×2mentioned ×2subscribed ×2closed ×1

Running openclaw doctor --fix fails because Node.js cannot find openclaw.mjs in the global npm openclaw module path.

Error Message

PowerShell 7.6.1 PS C:\Windows\System32> openclaw doctor --fix node:internal/modules/cjs/loader:1459 throw err; ^

Error: Cannot find module 'C:\Users\Zalex\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs' at Module._resolveFilename (node:internal/modules/cjs/loader:1456:15) at defaultResolveImpl (node:internal/modules/cjs/loader:1066:19) at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1071:22) at Module._load (node:internal/modules/cjs/loader:1242:25) at wrapModuleLoad (node:internal/modules/cjs/loader:255:19) at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5) at node:internal/main/run_main_module:33:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Node.js v24.14.0

Root Cause

Running openclaw doctor --fix fails because Node.js cannot find openclaw.mjs in the global npm openclaw module path.

Code Example

PowerShell 7.6.1
PS C:\Windows\System32> openclaw doctor --fix
node:internal/modules/cjs/loader:1459
  throw err;
  ^

Error: Cannot find module 'C:\Users\Zalex\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1456:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1066:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1071:22)
    at Module._load (node:internal/modules/cjs/loader:1242:25)
    at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
    at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
    at node:internal/main/run_main_module:33:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v24.14.0
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Running openclaw doctor --fix fails because Node.js cannot find openclaw.mjs in the global npm openclaw module path.

Steps to reproduce

openclaw doctor --fix

Expected behavior

Fix

Actual behavior

Error: Cannot find module 'C:\Users\Zalex\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs' code: 'MODULE_NOT_FOUND' Node.js v24.14.0

OpenClaw version

Releases 136 openclaw 2026.5.4

Operating system

windows 11

Install method

default

Model

Deepseek V4 PRO opencode

Provider / routing chain

Deepseek V4 PRO opencode

Additional provider/model setup details

No response

Logs, screenshots, and evidence

PowerShell 7.6.1
PS C:\Windows\System32> openclaw doctor --fix
node:internal/modules/cjs/loader:1459
  throw err;
  ^

Error: Cannot find module 'C:\Users\Zalex\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1456:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1066:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1071:22)
    at Module._load (node:internal/modules/cjs/loader:1242:25)
    at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
    at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
    at node:internal/main/run_main_module:33:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v24.14.0

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can likely be resolved by ensuring the openclaw.mjs file exists in the correct path within the global npm openclaw module directory.

Guidance

  • Verify the existence and path of openclaw.mjs in the global npm openclaw module directory (C:\Users\Zalex\AppData\Roaming\npm\node_modules\openclaw\).
  • Check if the openclaw package is correctly installed and up-to-date by running npm install openclaw or npm update openclaw.
  • If the file is missing, try reinstalling the openclaw package using npm uninstall openclaw followed by npm install openclaw.
  • Confirm that the openclaw package version (2026.5.4) is compatible with Node.js version (v24.14.0).

Example

No code snippet is provided as the issue seems related to module path resolution rather than code syntax.

Notes

The solution assumes that the openclaw.mjs file should be present in the specified directory. If the file is not supposed to be there, further investigation into the openclaw package structure and documentation may be necessary.

Recommendation

Apply workaround: Reinstall the openclaw package to ensure all necessary files, including openclaw.mjs, are correctly installed in the global npm module directory.

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…

FAQ

Expected behavior

Fix

Still need to ship something?

×6

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

Back to top recommendations

TRENDING