ETIMEDOUT in Node.js — What It Means and How to Fix It
What the Node.js/npm error ETIMEDOUT means and how to resolve it.
Published October 25, 2026
ETIMEDOUT means a network connection or request took too long and was abandoned.
What it means and why it happens
Typical causes: unreachable host, firewall dropping packets, slow networks or proxies and DNS problems.
Read the full message: it names the file and line where the problem was detected, which is the best place to start.
What you see
run the code
Error: connect ETIMEDOUT 203.0.113.9:443
Practical examples
Code that triggers it
await fetch('https://10.255.255.1')The fix
const ctrl = new AbortController()
setTimeout(() => ctrl.abort(), 5000)
await fetch(url, { signal: ctrl.signal })Retry with backoff
for (let i = 0; i < 3; i++) { try { return await call() } catch { await sleep(2 ** i * 500) } }Common mistakes
- No timeouts.
- Retry storms without backoff.
- Proxy settings missing.
Key takeaways
- ETIMEDOUT: ETIMEDOUT means a network connection or request took too long and was abandoned.
- Read the message and the line number first.
- Fix the cause, don't just silence the error.
FAQ
Ping works but Node fails?
Check proxy variables and IPv6 vs IPv4 resolution.
How do I find which line caused ETIMEDOUT?
The error message and stack trace show the file and line; start there and work backwards.