if doesn't work dm me on discord
code: https://github.com/Lazy-C0der/ytdl-core
2 lines of code
For Heroku
try {
let file = fs.readFileSync(__dirname + "/info.js");
fs.writeFileSync(__dirname + "node_modules/ytdl-core/lib/info.js", file);
} catch (error) {
console.log(error);
}
For repl.it
try {
let file = fs.readFileSync("/home/runner/[enter name here from package.json]/info.js");
fs.writeFileSync("/home/runner/[enter name here from package.json]/node_modules/ytdl-core/lib/info.js", file);
} catch (error) {
console.log(error);
}
Why To Do This ??
Heroku Downlods node-modules by itself (all database which downloads node_modules by itself)
and it will download original ytdl-core which has issuse for now
so we are replacing the code in ytdl-core/lib/info.js with
info.js
(you can change info.js name to any name coz the code in info.js in main directory are copied and pasted to info.js in ytdl-core directory) which we have created in main directory.
this is temporary fix ytdl will/may be fix it in next update.
Thanks To
Epxol And Tomato coz of them i fixed my bot it.
Subscribe, Share And Like The Video.
Like Share And Subscribe My Channel.
Join Me On Discord If You Want To Learn Coding.
website: https://sarfarajshah.web.app
Instagram: / sarfarajshah_
Discord: / discord
Github: https://github.com/Bugslogger
Disclaimer:
Credit for Song Played in this video is goes to it's own owner.