node-ytdl-core: Invalid regular expression: missing /
Since 1 or 2 hours, all videos passed on ytdl-core return this “Invalid regular expression” error
Stack trace:
evalmachine.<anonymous>:11
"mfZru","cfYAzm",1897615910,414154674,"IluoVc5",null,1,"XsmT",-659785013,577478260,-419211961,1087899650,/,,[/,913,/](,)};Wka(ncode);
^
SyntaxError: Invalid regular expression: missing /
at new Script (node:vm:100:7)
at exports.decipherFormats (D:\Documents\GitHub\ReAllToMP3\node_modules\ytdl-core\lib\sig.js:116:51)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async exports.getInfo (D:\Documents\GitHub\ReAllToMP3\node_modules\ytdl-core\lib\info.js:401:17)
ytdl-core version: 4.11.0
Edit: Temporary fix linked here: https://github.com/fent/node-ytdl-core/issues/1110#issuecomment-1219856316
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 35
- Comments: 45 (7 by maintainers)
They’re at it again, it stopped working just today.
Today I’m get the same error again :
Invalid regular expression: missing /
this solved it for me https://github.com/fent/node-ytdl-core/issues/1108#issuecomment-1212500413
🎉 This issue has been resolved in version 4.11.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
This error message just sudenly changed… yesterday it was the invalid regex, now it’s something new:
@GreepTheSheep Good stuff! I took the fix one step further and did a Pull Request so we can get this fix in. GreepTheSheep this PR is just that one commit u had for the fork
PR waiting for approval…anyone know who has PR approval/merge rights? PR: https://github.com/fent/node-ytdl-core/pull/1111
Okay I am trying to figure out the problem but this is my first time working with the source code of this project and with the youtube cipher algorithm so it’s taking a while anyways I’ve narrowed the problem down to a problem with evaluating nTransformScript because the code returned from youtube is for some reason broken, that’s the conclusion I reached
@austinharms I went into package.json changed the version to “ytdl-core”: “4.10.0”
deleted my node modules and ran yarn (yarn for me)
I’m back!
Holy shit I was about to wipe my system because this week I had some pc malware issues I solved. But when in doubt CHECK the GITHUB! I was that close…thanks to everyone for the comments…
I skew front-end but hoping devs solve the issue!
If you need to use it rn and don’t want to/can’t tinker inside module downgrade to version 4.10.0 npm command:
npm i ytld-core@4.10.0
only versions 4.10.1+ gave me this error during testingFound a fix: #1111
Same solution as the previous regex errors.
Made a fork of the temporary fix here: https://github.com/GreepTheSheep/node-ytdl-core
You can add it on your package.json with npm
npm i ytdl-core@https://github.com/GreepTheSheep/node-ytdl-core
@WaqasIbrahim sent via email
@dskaiser82 Thank you, your fix works. ytdl-core@4.10.0 seems to be working while ytdl-core@4.11.0 seems to have a problem with dependences.