-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError: Invalid or unexpected token #1261
Comments
I'm getting the same error in my project without changing anything. Presumably YouTube changed something up, but I certainly didn't expect that to produce an error like this! |
Yeah I also just started getting this error today. My app was working fine yesterday, and one of my users just notified me that one my features that uses ytdl-core wasn't working. Hope it gets fixed soon! |
same error |
I have the same error :( |
Same ! Showing like this for me: evalmachine.<anonymous>:426
koa=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,JB(d),h;}a=c.getResponseHeader("Content-Type")||"";f&&0<=a.indexOf("json")&&(")]};gma(ncode);
^^^^^^^^^^^^^^^^
SyntaxError: Invalid or unexpected token
at new Script (node:vm:93:7)
at Object.exports.decipherFormats (/usr/src/app/node_modules/ytdl-core/lib/sig.js:116:51)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async exports.getInfo (/usr/src/app/node_modules/ytdl-core/lib/info.js:401:17) |
as a quick investigation, I beleive the error is related to funcion
is being mis-parsed could be related to function |
I'm also facing this problem... |
Same issue: Invalid or unexpected token |
Try it. Work for me. |
+1 i got it today too without changing any of the code |
I got a similar error without changing any code as well:
|
Seeing this issue as well without any changes to code. |
I get the following error. Same with @khlevon 's PR sadly.
|
You can try this solution: #1252 (comment) |
This way you solved my problem! |
This worked for me, thanks a lot |
Same error, and solution with |
Same problem, but using this patched version worked for me, from PR #1217. "ytdl-core": "git+ssh://git@github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2" |
I was working on a project, when suddently, ytdl-core stoped working. So i created a new project to try a simple code:
I have the latest package of ytdl:
ytdl-core@4.11.5
But when i run the code:
node index.js,
i get the error:I'm not sure what appened, but it was working just fine, and suddently, this appear out of knowhere, without modifying anything.
The text was updated successfully, but these errors were encountered: