fent / node-ytdl-core

YouTube video downloader in javascript.
MIT License
4.48k stars 790 forks source link

ERROR TypeError: req.prependListener is not a function #1219

Open arcovoltaico opened 1 year ago

arcovoltaico commented 1 year ago

I have the 4.11.4 version patched as https://github.com/fent/node-ytdl-core/issues/1216

When executing ytdl.downloadFromInfo(info, downloadOptions).pipe(file);

Sometimes I am getting ERROR TypeError: req.prependListener is not a function

It only happens Why running my Angular Electron app by npm start, not on the built app.

richardabear commented 1 year ago

I cant reproduce but i ran into a slightly similar issue with something else.

Try enabling the nodeintegration arg

i.e.

const win = new BrowserWindow({
      webPreferences: {
         nodeIntegration: true,
      },
      width: 1920,
      height: 1080
   });
arcovoltaico commented 1 year ago

Thanks, but I already got that flag up.