openclaw - 💡(How to fix) Fix [Bug]: npm global install on Windows for 2026.4.7/2026.4.8 fails at runtime with missing modules [4 comments, 5 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#63127Fetched 2026-04-09 07:58:09
View on GitHub
Comments
4
Participants
5
Timeline
5
Reactions
3
Author
Timeline (top)
commented ×4labeled ×1

Error Message

Failed to read config at C:\Users\ZHJ.openclaw\openclaw.json Error: Cannot find module 'grammy' Require stack:

  • C:\Users\ZHJ\AppData\Roaming\npm\node_modules\openclaw\dist\allowed-updates-D6ZdYRyW.js

Root Cause

Code Example

Failed to read config at C:\Users\ZHJ\.openclaw\openclaw.json Error: Cannot find module 'grammy'
Require stack:
- C:\Users\ZHJ\AppData\Roaming\npm\node_modules\openclaw\dist\allowed-updates-D6ZdYRyW.js

---

Error: Cannot find module '@buape/carbon'
Require stack:
- C:\Users\ZHJ\AppData\Roaming\npm\node_modules\openclaw\dist\ui-ztuR6rec.js

---

gateway.mode is unset; gateway start will be blocked.

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

openclaw-48-windows-runtime-bug.md

Steps to reproduce

这里填复现步骤,你直接贴这段就行:

  1. Start from a working OpenClaw 2026.4.5 install on Windows (Node 24.14.0, npm global install).
  2. Run openclaw gateway stop.
  3. Delete C:\Users\ZHJ\AppData\Roaming\npm\node_modules\openclaw.
  4. Run npm install -g [email protected].
  5. Run openclaw --version and confirm it prints OpenClaw 2026.4.8 (9ece252).
  6. Run openclaw doctor --fix.
  7. Observe runtime failures including Cannot find module 'grammy' and later Cannot find module '@buape/carbon'.

如果它还有别的必填框,你继续截图给我,我直接一格一格替你填。

Expected behavior

After a successful npm install -g [email protected], OpenClaw should run normally on Windows without missing-module errors. openclaw doctor --fix should complete successfully, and commands like openclaw gateway start / openclaw status should work the same way they do on 2026.4.5.

Actual behavior

npm install -g [email protected]completes successfully, andopenclaw --versionreportsOpenClaw 2026.4.8 (9ece252), but openclaw doctor --fix` fails at runtime.

First observed error:

Failed to read config at C:\Users\ZHJ\.openclaw\openclaw.json Error: Cannot find module 'grammy'
Require stack:
- C:\Users\ZHJ\AppData\Roaming\npm\node_modules\openclaw\dist\allowed-updates-D6ZdYRyW.js

Doctor then continues in best-effort mode and later fails with:

Error: Cannot find module '@buape/carbon'
Require stack:
- C:\Users\ZHJ\AppData\Roaming\npm\node_modules\openclaw\dist\ui-ztuR6rec.js

During the same run it also reports:

gateway.mode is unset; gateway start will be blocked.

OpenClaw version

2026.4.8

Operating system

Windows 10.0.26300 x64

Install method

npm 全局安装

Model

custom-codexa-leizhen-cloud/gpt-5.4

Provider / routing chain

openclaw -> custom-codexa-leizhen-cloud (OpenAI-compatible endpoint)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The most likely fix is to reinstall dependencies or check for version compatibility issues with 'grammy' and '@buape/carbon' modules.

Guidance

  1. Reinstall dependencies: Try running npm install or npm install --force in the OpenClaw project directory to ensure all dependencies are correctly installed.
  2. Check version compatibility: Verify that the versions of 'grammy' and '@buape/carbon' are compatible with OpenClaw 2026.4.8.
  3. Verify module installation: Check if 'grammy' and '@buape/carbon' are installed correctly by running npm ls grammy and npm ls @buape/carbon.
  4. Clean npm cache: Run npm cache clean --force to clear the npm cache and then try reinstalling OpenClaw.

Example

No specific code snippet is provided as the issue seems to be related to dependency installation and version compatibility.

Notes

The issue might be specific to the Windows environment or the custom model/provider setup. Further investigation into the OpenClaw documentation and npm dependency management might be necessary.

Recommendation

Apply workaround: Reinstall dependencies and check for version compatibility issues, as this seems to be the most direct approach to resolving the missing module errors.

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

After a successful npm install -g [email protected], OpenClaw should run normally on Windows without missing-module errors. openclaw doctor --fix should complete successfully, and commands like openclaw gateway start / openclaw status should work the same way they do on 2026.4.5.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING