Javascript 无法读取属性';解码器';discord.js中未定义的

Javascript 无法读取属性';解码器';discord.js中未定义的,javascript,node.js,discord.js,Javascript,Node.js,Discord.js,对于我的音乐机器人,每当我尝试播放一首歌曲时,它都会在控制台中给我这个错误 我问了几个朋友,他们说这是一个discord.js问题 以下是我得到的错误: (node:106608) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Decoder' of undefined at AudioPlayer.playOpusStream (C:\Users\Keaton\node_modules\discor

对于我的音乐机器人,每当我尝试播放一首歌曲时,它都会在控制台中给我这个错误

我问了几个朋友,他们说这是一个discord.js问题

以下是我得到的错误:

(node:106608) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Decoder' of undefined
    at AudioPlayer.playOpusStream (C:\Users\Keaton\node_modules\discord.js\src\client\voice\player\BasePlayer.js:73:38)
    at VoiceConnection.play (C:\Users\Keaton\node_modules\discord.js\src\client\voice\util\PlayInterface.js:75:28)
    at play (C:\Users\Keaton\Documents\Musix\system\music.js:39:8)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:106608) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:106608) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
可以在git存储库中找到BasePlayer.js的代码


我已经重新安装了discord.js,但仍然出现错误。我该怎么办?

您安装了NPM discord.js音频包了吗?如果是这样,它们是否在代码中正确定义?您好,谢谢您的回复。我已经安装了NPM discord.js音频包,并在我的代码中正确定义了它。你能将
music.js
文件上传到吗?同时检查第39行第8列,它触发了错误。您是否安装了NPM discord.js音频包?如果是这样,它们是否在代码中正确定义?您好,谢谢您的回复。我已经安装了NPM discord.js音频包,并在我的代码中正确定义了它。你能将
music.js
文件上传到吗?同时检查触发错误的第39行第8列