Error: FFmpeg/avconv not found!

everytime i run the code it says the error on the title code:
const { Events } = require('discord.js');

module.exports = {
name: Events.ClientReady,
execute(client) {
console.log(`Ready! Logged in as ${client.user.tag}`);
const { joinVoiceChannel } = require('@discordjs/voice');
let channel = client.channels.cache.get('871129812046082078')
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
const { createAudioPlayer, NoSubscriberBehavior, createAudioResource, StreamType } = require('@discordjs/voice');
const { join } = require('node:path');
const { createReadStream } = require('node:fs');
const player = createAudioPlayer({
behaviors: {
noSubscriber: NoSubscriberBehavior.Pause,
},
});

const resource = createAudioResource(createReadStream(join('./test.webm')));

player.play(resource);
},
};
const { Events } = require('discord.js');

module.exports = {
name: Events.ClientReady,
execute(client) {
console.log(`Ready! Logged in as ${client.user.tag}`);
const { joinVoiceChannel } = require('@discordjs/voice');
let channel = client.channels.cache.get('871129812046082078')
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
const { createAudioPlayer, NoSubscriberBehavior, createAudioResource, StreamType } = require('@discordjs/voice');
const { join } = require('node:path');
const { createReadStream } = require('node:fs');
const player = createAudioPlayer({
behaviors: {
noSubscriber: NoSubscriberBehavior.Pause,
},
});

const resource = createAudioResource(createReadStream(join('./test.webm')));

player.play(resource);
},
};
8 Replies
d.js toolkit
d.js toolkit11mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
M7MD
M7MDOP11mo ago
[email protected] i run the code and it shows me an error: Error: FFmpeg/avconv not found! i tried mp3 i tried ogg i tried webm it didn't work! i go to the guide to see if i did something wrong but i didn't
d.js docs
d.js docs11mo ago
- npm: npm install ffmpeg-static - Install: Download | chocolatey | homebrew | your distributions package manager - Tutorial: YouTube - ffmpeg-binaries is deprecated, uninstall it with npm rm ffmpeg-binaries
M7MD
M7MDOP11mo ago
Do i need install their app or not?
ThePedroo
ThePedroo11mo ago
App? No, you can either install FFmpeg into your system or simply install ffmpeg-static npm package The FFmpeg system installation is recommended
M7MD
M7MDOP10mo ago
idk what to call it but thx now i've got a error for your info im not expert in audio players im learning
M7MD
M7MDOP10mo ago
No description
M7MD
M7MDOP10mo ago
Oh i didn't notice sorry
Want results from more Discord servers?
Add your server