Ganesh
Ganesh
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
No description
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/24/2025 in #back-end
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
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
4 replies