if doesn't work dm me on discord discord server link given below
don't forget to subscribe.
code: https://github.com/Lazy-C0der/ytdl-core
2 lines of code
you can try this code in this code you don't have to edit anything just paste it.
try {
let file = fs.readFileSync(__dirname + "/info.js");
fs.writeFileSync(__dirname + "node_modules/ytdl-core/lib/info.js", file);
} catch (error) {
console.log(error);
}
if above code doesn't work then copy code below and you have to edit it as instructed in video.
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 ??
hosting serevices Downlods node-modules by itself so,
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.
you can use this code until ytdl officially fix 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/Bugsloggerer