-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
TypeError: Invalid URL #1342
Comments
This boils down to: const whatwg = require('whatwg-url@5')
new whatwg.URL('https://r2---sn-n4v7sney.googlevideo.com') // throws not valid url error using: const whatwg = require('whatwg-url@latest')
new whatwg.URL('https://r2---sn-n4v7sney.googlevideo.com') // works fine
new globalThis.URL('https://r2---sn-n4v7sney.googlevideo.com') // also works fine And we could not use the latest whatwg-url version since v2 still supports node v4 Maybe we could rely on the built in node version if available and then fallback to whatwg if it's not available? changing this to: Line 17 in b5417ae
This will not actually fix the issue for older node versions, only hide it in newer node versions... fyi, v3 don't have this issue cuz it uses nodes own URL |
could you try 2.6.6 if it works now? |
It works fine in version 2.6.6 |
Reproduction
Steps to reproduce the behavior:
TypeError: Invalid URL
You can try to reproduce the issue by running the code below
Expected behavior
https://r2---sn-n4v7sney.googlevideo.com is a valid url
Screenshots
Your Environment
Additional context
The text was updated successfully, but these errors were encountered: