我收到此“错误:未找到 FFmpeg/avconv!”

Fha*_*ous 0 ffmpeg node.js discord.js

我正在尝试创建一个不和谐的机器人,但是每次尝试运行 youtube 链接时都会收到此错误。

Error: FFmpeg/avconv not found!
    at Function.getInfo (C:\Users\-\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:130:11)
    at Function.create (C:\Users\-\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:143:38)
    at new FFmpeg (C:\Users\-\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:44:27)
    at AudioPlayer.playUnknown (C:\Users\-\discord-bot\node_modules\discord.js\src\client\voice\player\BasePlayer.js:47:20)
    at VoiceConnection.play (C:\Users\-\discord-bot\node_modules\discord.js\src\client\voice\util\PlayInterface.js:71:28)
    at Object.play (C:\Users\-\discord-bot\commands\play.js:78:8)
    at Object.execute (C:\Users\-\discord-bot\commands\play.js:48:16)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:14004) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (C:\Users\-\discord-bot\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:14004) 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 unhandl
ed promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:14004) [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.
Run Code Online (Sandbox Code Playgroud)

我安装了 ffmpegnpm install -g ffmpeg-binaries以尝试全局安装它。我还将 ffmpeg 添加到 PATH,但这似乎不起作用。

无论如何要解决它?

小智 10

尝试运行这个 npm i ffmpeg-static