You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constwhatwg=require('whatwg-url@5')newwhatwg.URL('https://r2---sn-n4v7sney.googlevideo.com')// throws not valid url error
using:
constwhatwg=require('whatwg-url@latest')newwhatwg.URL('https://r2---sn-n4v7sney.googlevideo.com')// works finenewglobalThis.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
using a older whatwg-url is by no doubt buggy...
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: require('url').URL || whatwgUrl.URL
Activity
jimmywarting commentedon Oct 21, 2021
This boils down to:
using:
And we could not use the latest whatwg-url version since v2 still supports node v4
using a older whatwg-url is by no doubt buggy...
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:
require('url').URL || whatwgUrl.URLnode-fetch/src/request.js
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
jimmywarting commentedon Oct 31, 2021
could you try 2.6.6 if it works now?
tyanbiao commentedon Nov 3, 2021
It works fine in version 2.6.6