Current ytdl-core is 0.29.7
The Error:
Error: This video is unavailable
at exports.getBasicInfo (C:\Users\me\Desktop\discord-bot\node_modules\ytdl-core\lib\info.js:255:16)
at fn (C:\Users\me\Desktop\discord-bot\node_modules\ytdl-core\lib\info.js:373:9)
at request (C:\Users\me\Desktop\discord-bot\node_modules\ytdl-core\lib\info.js:198:5)
at PassThrough.Miniget.stream.on (C:\Users\me\Desktop\discord-bot\node_modules\ytdl-core\node_modules\miniget\dist\index.js:196:32)
at PassThrough.emit (events.js:182:13)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Known Failing Videos:
https://youtu.be/BH8pv4Iht8g
https://www.youtube.com/watch?v=FsNzdKLKsKQ
https://youtu.be/DtGNg7kbClQ
Known Working Videos:
https://www.youtube.com/watch?v=hddMXZHHR0M
https://youtu.be/rT_vrHjKXgc
https://youtu.be/Kx7B-XvmFtE
(IMO) It appears to be some related to more current music releases.
See if updating ytdl-core helps:
npm install ytdl-core@latest
Sorry for the late response.
I have already installed the latest ytdl-core using npm i ytdl-core@latest
I am currently showing 0.29.7
That's not the latest version, as you can see on https://github.com/fent/node-ytdl-core/releases
and from the readme:
If you're using a bot or app that uses ytdl-core, it may be dependent on an older version. Make sure you're installing the latest version of ytdl-core to keep up with the latest fixes.
I'm terribly sorry for this "issue" then.
I could have sworn that I had already tried forcing it to the latest version.
Fixed: v1.0.3 actually installed this time
Most helpful comment
See if updating ytdl-core helps:
npm install ytdl-core@latest