fetch fails with ETIMEOUT
I am learning node and in this tutorial's https://nodejs.org/en/learn/manipulating-files/reading-files-with-nodejs
last sippet they are fetching a
txt
file from a url. However I keep getting this error
I searched a bit but All i can see is how to apply timeout to fetch. I'd be thankful if someone can point me to the right direction.
if it matters I'm running node in WSL2 with ubuntu1 Reply
okay I tried replacing the url with some other
txt
file url or png
and it works
but this url doesn't. I don't understand I can access the file by typing it in my browser so it should be public?
Okay so apparantly the fetch failing wasn't the link issue at all.
https://github.com/nodejs/undici/issues/2777
Something about default dns resolve time being 250 and that wasn't enough
network-family-autoselection-attempt-timeout=500
made it work.
I don't understand the intricacies and I don't care. This was such a goose chase ...
I'm just leaving this here for the curious ones