Skip to content

[Bug]: CLI crashes on all commands due to missing discord-api-types module after upgrading to 2026.4.5 #62224

Description

@Sbwillbealier

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading OpenClaw from version 2026.4.2 to 2026.4.5, running any openclaw command (such as openclaw status or openclaw doctor --fix) results in a fatal error. The CLI is unable to find the discord-api-types/v10.js module inside the @buape/carbon dependency. Local installation of the missing package does not resolve this global dependency issue.

Steps to reproduce

  1. Have a working installation of OpenClaw 2026.4.2.
  2. Upgrade OpenClaw to version 2026.4.5.
  3. Run openclaw status or openclaw doctor --fix in the terminal.
  4. Observe the Cannot find module error.

Expected behavior

The CLI commands should execute successfully after the upgrade, or openclaw doctor --fix should be able to automatically repair the missing dependency.

Actual behavior

Running openclaw status or openclaw doctor --fix outputs the following:

root@iZbp1anlo43frk99hyqtaeZ:~# openclaw status  
Failed to read config at /root/.openclaw/openclaw.json Error: Cannot find module '/usr/lib/node_modules/openclaw/node_modules/@buape/carbon/node_modules/discord-api-types/v10.js'  

...  
🦞 OpenClaw 2026.4.5 (3e72c03) — I don't sleep, I just enter low-power mode and dream of clean diffs.  

Config invalid  
File: ~/.openclaw/openclaw.json  
Problem:  
  - <root>: read failed: Error: Cannot find module '/usr/lib/node_modules/openclaw/node_modules/@buape/carbon/node_modules/discord-api-types/v10.js'  

Run: openclaw doctor --fix  

OpenClaw version

2026.4.5

Operating system

Ubuntu 24.04.4 LTS

Install method

npm

Model

GLM-5

Provider / routing chain

zai

Additional provider/model setup details

The issue specifically started occurring after upgrading from 2026.4.2 to 2026.4.5.
I attempted to fix this by running npm install discord-api-types@latest in the terminal, but since it installs locally, it doesn't resolve the global dependency corruption in /usr/lib/node_modules/openclaw/....

Logs, screenshots, and evidence

root@iZbp1anlo43frk99hyqtaeZ:~# openclaw status
Failed to read config at /root/.openclaw/openclaw.json Error: Cannot find module '/usr/lib/node_modules/openclaw/node_modules/@buape/carbon/node_modules/discord-api-types/v10.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1419:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1408:15)
    at resolveExports (node:internal/modules/cjs/loader:650:14)
    at Function._findPath (node:internal/modules/cjs/loader:717:31)
    at Function._resolveFilename (node:internal/modules/cjs/loader:1369:27)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:148703)
    at jitiRequire (/usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:150290)
    at /usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:157987
    at /usr/lib/node_modules/openclaw/node_modules/@buape/carbon/dist/src/abstracts/AnySelectMenuInteraction.js:1:217 {
  code: 'MODULE_NOT_FOUND',
  path: '/usr/lib/node_modules/openclaw/node_modules/@buape/carbon/node_modules/discord-api-types'
}

🦞 OpenClaw 2026.4.5 (3e72c03) — I don't sleep, I just enter low-power mode and dream of clean diffs.

Config invalid
File: ~/.openclaw/openclaw.json
Problem:
  - <root>: read failed: Error: Cannot find module '/usr/lib/node_modules/openclaw/node_modules/@buape/carbon/node_modules/discord-api-types/v10.js'

Run: openclaw doctor --fix
Failed to read config at /root/.openclaw/openclaw.json Error: Cannot find module '/usr/lib/node_modules/openclaw/node_modules/@buape/carbon/node_modules/discord-api-types/v10.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1419:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1408:15)
    at resolveExports (node:internal/modules/cjs/loader:650:14)
    at Function._findPath (node:internal/modules/cjs/loader:717:31)
    at Function._resolveFilename (node:internal/modules/cjs/loader:1369:27)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:148703)
    at jitiRequire (/usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:150290)
    at /usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:157987
    at /usr/lib/node_modules/openclaw/node_modules/@buape/carbon/dist/src/abstracts/AnySelectMenuInteraction.js:1:217 {
  code: 'MODULE_NOT_FOUND',
  path: '/usr/lib/node_modules/openclaw/node_modules/@buape/carbon/node_modules/discord-api-types'
}
[openclaw] Failed to start CLI: Error: Cannot find module '/usr/lib/node_modules/openclaw/node_modules/@buape/carbon/node_modules/discord-api-types/v10.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1419:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1408:15)
    at resolveExports (node:internal/modules/cjs/loader:650:14)
    at Function._findPath (node:internal/modules/cjs/loader:717:31)
    at Function._resolveFilename (node:internal/modules/cjs/loader:1369:27)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:148703)
    at jitiRequire (/usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:150290)
    at /usr/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:157987
    at /usr/lib/node_modules/openclaw/node_modules/@buape/carbon/dist/src/abstracts/AnySelectMenuInteraction.js:1:217

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions