openclaw - 💡(How to fix) Fix Discord voice: @discordjs/voice MODULE_NOT_FOUND after v2026.3.28 update + voice.tts config breaking change [1 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#56874Fetched 2026-04-08 01:46:40
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
1
Participants

Error Message

[EventQueue] Listener DiscordVoiceReadyListener failed for event READY: Error: Cannot find module '@discordjs/voice' Require stack:

  • /path/to/openclaw/dist/manager.runtime-gd1YL1MK.js

Root Cause

Root cause: The @discordjs/voice package (v0.19.2) and related dependencies (opusscript, prism-media, @snazzah/davey) are installed under dist/extensions/discord/node_modules/, but the voice manager runtime (manager.runtime-*.js) runs from the dist/ root directory. Node.js require() resolution cannot find these packages from the root context.

Fix Action

Fix / Workaround

Workaround: Creating symlinks from the root node_modules/ to the extensions subdirectory:

cd /path/to/openclaw
mkdir -p node_modules/@discordjs node_modules/@snazzah
ln -sf ../../dist/extensions/discord/node_modules/@discordjs/voice node_modules/@discordjs/voice
ln -sf ../../dist/extensions/discord/node_modules/@snazzah/davey node_modules/@snazzah/davey
ln -sf ../../dist/extensions/discord/node_modules/@snazzah/davey-linux-x64-gnu node_modules/@snazzah/davey-linux-x64-gnu
ln -sf ../dist/extensions/discord/node_modules/opusscript node_modules/opusscript
ln -sf ../dist/extensions/discord/node_modules/prism-media node_modules/prism-media

⚠️ This workaround is lost on every npm install / update.

Code Example

[EventQueue] Listener DiscordVoiceReadyListener failed for event READY:
Error: Cannot find module '@discordjs/voice'
Require stack:
- /path/to/openclaw/dist/manager.runtime-gd1YL1MK.js

---

@discordjs/voice: 0.19.2         (but only in extensions subdir)
prism-media: 1.3.5opusscript: 0.1.1@snazzah/davey: 0.1.10ffmpeg: 6.1.1 + libopus         ✅
native crypto aes-256-gcm       ✅

---

cd /path/to/openclaw
mkdir -p node_modules/@discordjs node_modules/@snazzah
ln -sf ../../dist/extensions/discord/node_modules/@discordjs/voice node_modules/@discordjs/voice
ln -sf ../../dist/extensions/discord/node_modules/@snazzah/davey node_modules/@snazzah/davey
ln -sf ../../dist/extensions/discord/node_modules/@snazzah/davey-linux-x64-gnu node_modules/@snazzah/davey-linux-x64-gnu
ln -sf ../dist/extensions/discord/node_modules/opusscript node_modules/opusscript
ln -sf ../dist/extensions/discord/node_modules/prism-media node_modules/prism-media

---

"voice": {
  "tts": {
    "provider": "openai",
    "openai": {
      "voice": "nova"
    }
  }
}

---

channels.discord.voice.tts: Unrecognized key: "openai"

---

"voice": {
  "tts": {
    "provider": "openai",
    "providers": {
      "openai": {
        "voice": "nova"
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug Description

After updating to v2026.3.28, Discord voice joining fails with Cannot find module '@discordjs/voice'. Additionally, the channels.discord.voice.tts config schema changed in a breaking way without migration or changelog notice.


Issue 1: @discordjs/voice not resolvable from runtime context

Error:

[EventQueue] Listener DiscordVoiceReadyListener failed for event READY:
Error: Cannot find module '@discordjs/voice'
Require stack:
- /path/to/openclaw/dist/manager.runtime-gd1YL1MK.js

Root cause: The @discordjs/voice package (v0.19.2) and related dependencies (opusscript, prism-media, @snazzah/davey) are installed under dist/extensions/discord/node_modules/, but the voice manager runtime (manager.runtime-*.js) runs from the dist/ root directory. Node.js require() resolution cannot find these packages from the root context.

Dependency report (from generateDependencyReport()):

@discordjs/voice: 0.19.2        ✅ (but only in extensions subdir)
prism-media: 1.3.5              ✅
opusscript: 0.1.1               ✅
@snazzah/davey: 0.1.10          ✅
ffmpeg: 6.1.1 + libopus         ✅
native crypto aes-256-gcm       ✅

All packages exist under dist/extensions/discord/node_modules/ but are not accessible from dist/manager.runtime-*.js.

Workaround: Creating symlinks from the root node_modules/ to the extensions subdirectory:

cd /path/to/openclaw
mkdir -p node_modules/@discordjs node_modules/@snazzah
ln -sf ../../dist/extensions/discord/node_modules/@discordjs/voice node_modules/@discordjs/voice
ln -sf ../../dist/extensions/discord/node_modules/@snazzah/davey node_modules/@snazzah/davey
ln -sf ../../dist/extensions/discord/node_modules/@snazzah/davey-linux-x64-gnu node_modules/@snazzah/davey-linux-x64-gnu
ln -sf ../dist/extensions/discord/node_modules/opusscript node_modules/opusscript
ln -sf ../dist/extensions/discord/node_modules/prism-media node_modules/prism-media

⚠️ This workaround is lost on every npm install / update.


Issue 2: voice.tts config breaking change

Previous config (worked in v2026.3.13):

"voice": {
  "tts": {
    "provider": "openai",
    "openai": {
      "voice": "nova"
    }
  }
}

Error on v2026.3.28 startup:

channels.discord.voice.tts: Unrecognized key: "openai"

The gateway refuses to start with the old config. The new schema expects provider-specific settings under a providers key:

"voice": {
  "tts": {
    "provider": "openai",
    "providers": {
      "openai": {
        "voice": "nova"
      }
    }
  }
}

Impact: The gateway fails to start entirely with the old config — requires manual config editing to recover.


Expected Behavior

  1. Voice dependencies should be resolvable from the runtime context without manual symlinks
  2. Config schema changes should either auto-migrate old formats or provide a clear migration error message (not a generic "Unrecognized key")

Environment

  • OpenClaw version: 2026.3.28
  • Previous version: 2026.3.13
  • OS: Ubuntu 24.04 (x64)
  • Node.js: v25.4.0
  • Install method: npm install -g openclaw

extent analysis

Fix Plan

To resolve the issues, follow these steps:

Issue 1: @discordjs/voice not resolvable

  1. Install dependencies in the root directory: Run the following command to install the required dependencies in the root node_modules/ directory:

npm install @discordjs/voice opusscript prism-media @snazzah/davey

2. **Update the `package.json` file**: Ensure that the dependencies are listed in the `package.json` file:
   ```json
"dependencies": {
  "@discordjs/voice": "^0.19.2",
  "opusscript": "^0.1.1",
  "prism-media": "^1.3.5",
  "@snazzah/davey": "^0.1.10"
}

Issue 2: voice.tts config breaking change

  1. Update the config file: Modify the voice.tts configuration to match the new schema:

"voice": { "tts": { "provider": "openai", "providers": { "openai": { "voice": "nova" } } } }


### Verification
1. **Restart the OpenClaw gateway**: After applying the fixes, restart the gateway to ensure that the changes take effect.
2. **Verify voice functionality**: Test the voice functionality to confirm that it is working as expected.
3. **Check the config**: Verify that the updated config is being used correctly and that there are no errors related to the `voice.tts` configuration.

### Extra Tips
* To avoid similar issues in the future, ensure that dependencies are installed in the correct directory and that config changes are properly documented and tested.
* Consider implementing automated tests to catch breaking changes and ensure that the application remains functional after updates.

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

openclaw - 💡(How to fix) Fix Discord voice: @discordjs/voice MODULE_NOT_FOUND after v2026.3.28 update + voice.tts config breaking change [1 participants]