wet333 / yt-get

1 stars 0 forks source link

SyntaxError: Invalid or unexpected token #2

Open beyluta opened 1 year ago

beyluta commented 1 year ago
evalmachine.:426
Ama=function(a,b,c,d){var e=null;switch(b){case "JSON":try{var f=c.responseText}catch(h){throw d=Error("Error reading responseText"),d.params=a,oC(d),h;}a=c.getResponseHeader("Content-Type")||"";f&&0<=a.indexOf("json")&&(")]};Ila(ncode);
^^^^^^^^^^^^^^^^

SyntaxError: Invalid or unexpected token

Using an older version of ytdl-core seems to work for now. This is mainly an issue plaging the official ytdl-core project, but I'll leave this here so that newcomers know what the issue is, until it gets fixed and this package gets updated.

This issue explains a little more

yumizzzy commented 1 year ago

i try to use the old version but it gets the same error

beyluta commented 1 year ago

i try to use the old version but it gets the same error

Then you aren't updating the packages correctly. Modify your package-lock.json to use version 4.10.0 of ytdl-core. Modify all instances of ytdl-core (use CTRL + F to search). Then do npm ci.

If that doesn't fix it then you need to navigate to the node_modules/yt-get/node_modules/ytdl-core and replace all the files in there with the files in the 4.10.0 version of the package.

Correct version