© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Kevin Powell - CommunityKP-C
Kevin Powell - Community•12mo ago•
3 replies
Ganesh

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
txt
file from a url. However I keep getting this error

ganesh@LAPTOP-G6NM8GVN:~/repos/node-practice$ node app.js
Debugger attached.
TypeError: fetch failed
    at node:internal/deps/undici/undici:13502:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async downloadFile (file:///home/ganesh/repos/node-practice/app.js:10:22)
    at async file:///home/ganesh/repos/node-practice/app.js:44:3 {
  [cause]: AggregateError [ETIMEDOUT]: 
      at internalConnectMultiple (node:net:1139:18)
      at internalConnectMultiple (node:net:1215:5)
      at Timeout.internalConnectMultipleTimeout (node:net:1739:5)
      at listOnTimeout (node:internal/timers:596:11)
      at process.processTimers (node:internal/timers:529:7) {
    code: 'ETIMEDOUT',
    [errors]: [ [Error], [Error] ]
  }
}
Error: fetch failed
ganesh@LAPTOP-G6NM8GVN:~/repos/node-practice$ node app.js
Debugger attached.
TypeError: fetch failed
    at node:internal/deps/undici/undici:13502:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async downloadFile (file:///home/ganesh/repos/node-practice/app.js:10:22)
    at async file:///home/ganesh/repos/node-practice/app.js:44:3 {
  [cause]: AggregateError [ETIMEDOUT]: 
      at internalConnectMultiple (node:net:1139:18)
      at internalConnectMultiple (node:net:1215:5)
      at Timeout.internalConnectMultipleTimeout (node:net:1739:5)
      at listOnTimeout (node:internal/timers:596:11)
      at process.processTimers (node:internal/timers:529:7) {
    code: 'ETIMEDOUT',
    [errors]: [ [Error], [Error] ]
  }
}
Error: fetch failed


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 ubuntu
Kevin Powell - Community banner
Kevin Powell - CommunityJoin
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Fetch Confusion
Kevin Powell - CommunityKP-CKevin Powell - Community / back-end
3y ago
How do you fetch instagram?
Kevin Powell - CommunityKP-CKevin Powell - Community / back-end
2y ago
SQL foreign key constraint fails
Kevin Powell - CommunityKP-CKevin Powell - Community / back-end
4y ago