- Community aggregator
- Country: United States
Node.js "fetch failed" with ETIMEDOUT or ENETUNREACH While curl Works: The Broken IPv6 Route
Short answer: if a Node.js request dies with TypeError: fetch failed , AggregateError [ETIMEDOUT] , or connect ENETUNREACH 2606:... but curl to the same host succeeds, the hostname probably resolves to both IPv6 and IPv4 addresses, and your machine or container has an IPv6 address family it cannot…