Error: Could not extract functions
The code that was working until yesterday suddenly gives this error:
C:\Nabi\notpixel\node_modules\ytdl-core\lib\sig.js:20
throw Error('Could not extract functions');
^
Error: Could not extract functions
at C:\Nabi\notpixel\node_modules\ytdl-core\lib\sig.js:20:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on PassThrough instance at:
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.18.0
I have the same problem
same issue here! i guess youtube changed something...
That seems like a new bug that's showed up in the package and the general consensus for now seems to be to try the @distube/ytdl-core package instead.
You can install it in place of ytdl-core like this
npm uninstall ytdl-core && npm i ytdl-core@npm:@distube/ytdl-core
planet-bluto's solution worked for me
Of course, the suggested option https://github.com/distubejs/ytdl-core is also good. But I migrated to https://github.com/foxesdocode/yt-dlp-wrap to have a closer connection with the yt-dlp parent program and not get bugs again. It also supports cookies jar file.
In my project, I ended up using both- one for getting info (ytdl) and one for fetching audio data (yt-dlp)- so that's a totally valid solution. I don't remember if there was really a way to get metadata with just yt-dlp, but I didn't look into it because I didn't want to completely replace all the instances in which I did use ytdl
I was getting this same error but fortunately stumbled upon this thread via search and the forked library worked. Good job to the guy maintaining the fork (the original ytdl-core hasn't been updated in a year)
I have same problem.
@planet-bluto Solution Worked for me.
It was able to download mp4 but video is not opening
Thanks @planet-bluto
npm i ytdl-core@npm:@distube/ytdl-core
Solved the problem.
I am getting a typescript error with @planet-bluto solution.
File '<path>/node_modules/ytdl-core/typings/index.d.ts' is not a module.
Does anybody know how I can fix this?
I am getting a typescript error with @planet-bluto solution.
File '<path>/node_modules/ytdl-core/typings/index.d.ts' is not a module.Does anybody know how I can fix this?
Same problem
I am getting a typescript error with @planet-bluto solution.
File '<path>/node_modules/ytdl-core/typings/index.d.ts' is not a module.Does anybody know how I can fix this?
npm i @distube/ytdl-core@latest
and use
import ytdl from '@distube/ytdl-core';
That seems like a new bug that's showed up in the package and the general consensus for now seems to be to try the @distube/ytdl-core package instead.
You can install it in place of ytdl-core like this
npm uninstall ytdl-core && npm i ytdl-core@npm:@distube/ytdl-core
@planet-bluto Thanks for the solution. I was trying to use it for the first time and had the same error, and this solution worked!
Note: to get the video information on YouTube I had to change the code, as it is in the repository @distube/ytdl-core
That seems like a new bug that's showed up in the package and the general consensus for now seems to be to try the @distube/ytdl-core package instead.
You can install it in place of ytdl-core like this
npm uninstall ytdl-core && npm i ytdl-core@npm:@distube/ytdl-core
it's working thk
Solution from @planet-bluto worked fine for me
Solution from @planet-bluto worked fine for me
That seems like a new bug that's showed up in the package and the general consensus for now seems to be to try the @distube/ytdl-core package instead.
You can install it in place of ytdl-core like this
npm uninstall ytdl-core && npm i ytdl-core@npm:@distube/ytdl-core
This worked for me!
@planet-bluto Thanks! its work for me.
Thanks @planet-bluto it worked
Thanks @planet-bluto Thanks! its work for me.
I am getting a typescript error with @planet-bluto solution.
File '<path>/node_modules/ytdl-core/typings/index.d.ts' is not a module.Does anybody know how I can fix this?
npm i @distube/ytdl-core@latestand useimport ytdl from '@distube/ytdl-core';
Great, this works for me
@planet-bluto's solution works, but only on Windows, on Debian I'm getting this error then:
webidl.is.File = webidl.util.MakeTypeAssertion(File)
^
ReferenceError: File is not defined
at Object.<anonymous> (.../node_modules/undici/lib/web/webidl/index.js:531:48)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (.../test/node_modules/undici/lib/web/fetch/util.js:12:20)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
Node.js v18.20.4
That seems like a new bug that's showed up in the package and the general consensus for now seems to be to try the @distube/ytdl-core package instead.
You can install it in place of ytdl-core like this
npm uninstall ytdl-core && npm i ytdl-core@npm:@distube/ytdl-core
@planet-bluto, Does this solution still work with @distube/ytdl-core version 4.16.12? The last time I tried using it(last week) for downloading media it generated two 17***-player.js files without any successful download.
That seems like a new bug that's showed up in the package and the general consensus for now seems to be to try the @distube/ytdl-core package instead.
You can install it in place of ytdl-core like this
npm uninstall ytdl-core && npm i ytdl-core@npm:@distube/ytdl-core
i get this error: MinigetError: Status code: 403
what can i do now???
That seems like a new bug that's showed up in the package and the general consensus for now seems to be to try the @distube/ytdl-core package instead.
You can install it in place of ytdl-core like this
npm uninstall ytdl-core && npm i ytdl-core@npm:@distube/ytdl-corei get this error:
MinigetError: Status code: 403what can i do now???
Same question here