node-ytsr icon indicating copy to clipboard operation
node-ytsr copied to clipboard

Not working in browser

Open johtso opened this issue 4 years ago • 3 comments

Trying to use the package in the browser seems to result in an error from miniget:

https://codesandbox.io/s/modest-cray-on365?file=/src/index.ts image

Is this expected to work?

johtso avatar Jul 16 '21 10:07 johtso

you should also get that error when your polyfills for http and https fail so pls validate that that properly worked

TimeForANinja avatar Jul 29 '21 22:07 TimeForANinja

Okay, so tried a different polyfilling approach using http-browserify aliased to http.

Now I get this error: image https://codesandbox.io/s/modest-cray-on365?file=/src/index.ts

Is there a different polyfilling approach I should be using perhaps?

johtso avatar Aug 09 '21 14:08 johtso

😅 unfortunately never webpacked sth myself so no idea the libs (ytsr, ytpl, ytdl-core, miniget) should only use the default node.js http / https libraries though

TimeForANinja avatar Aug 27 '21 11:08 TimeForANinja