X
X
xtondan2021-06-12 22:31:08
Node.js
xtondan, 2021-06-12 22:31:08

I want to create a discord bot that plays music, but at the very beginning it gives a lot of errors and does not work. What to do?

C:\Users\Admin>npm install discord.js ffmpeg-binaries opusscript ytdl-core --save
npm WARN deprecated [email protected]: ffmpeg-binaries is no longer being maintained. use ffmpeg-static, or just install ffmpeg

> [email protected] install C:\Users\Admin\node_modules\lzma-native
> node-pre-gyp install --fallback-to-build && node node_modules/rimraf/ bin.js build

[lzma-native] Success: "C:\Users\Admin\node_modules\lzma-native\binding-v3.0.8-node-v57-win32-x64\lzma_native.node" is installed via remote

> ffmpeg- [email protected] install C:\Users\Admin\node_modules\ffmpeg-binaries
> node install

events.js:183
throw er; // Unhandled 'error' event
^

Error: getaddrinfo ENOTFOUND ffmpeg.zeranoe.com ffmpeg.zeranoe.com:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
npm WARN Admin No description
npm WARN Admin No repository field.
npm WARN Admin No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache\_logs\2021-06-12T19_22_15_276Z-debug.log

I print the bot through Notepad ++
I can at least run it in cmd, but I can’t set the directory ((9(...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergio, 2021-06-12
@xtondan

As the message says, the ffmpeg-binaries package is outdated and no longer supported, and judging by the error, npm cannot reach the ffmpeg.zeranoe.com server, where the ffmpeg binaries apparently lie.
You need to replace ffmpeg-binaries with ffmpeg or ffmpeg-static.
And one more thing - you install packages directly to your home directory C:\Users\Admin - I do not advise you to do this, it's better to create a separate folder for your discord bot project and install packages there.

K
Kentavr16, 2021-06-12
@Kentavr16

The libraries you are installing are out of date
. Just translate the mistakes - there is a guide on what to do

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question