Error messages
“npm error code ETIMEDOUT” on Mac
ETIMEDOUT means that the other side did not answer in time. Node.js documentation says: “the connected party did not properly respond after a period of time.”
Symptoms
npm installstops withnpm error code ETIMEDOUT.- npm adds that this is a problem related to network connectivity.
- It fails on one network, such as a company network or a hotspot.
Likely causes
- A proxy that npm does not know. On a network that needs a proxy, npm needs its
proxyandhttps-proxysettings. - A registry that you cannot reach. An old
registrysetting can point to a private server. - A slow or lossy connection. Large packages time out on a weak Wi-Fi or a hotspot.
- A broken IPv6 path. The registry has an IPv6 address, and IPv6 does not work on your network.
How to check
Show npm's registry and proxy settings.
npm config get registry npm config get proxy npm config get https-proxyAsk the registry for an answer.
npm pingTest the registry with curl, IPv4 only.
curl -4 -I https://registry.npmjs.org/Measure the connection.
networkQuality
How to fix it
If the network needs a proxy, set it for npm.
npm config set https-proxy http://proxy.example.com:8080Remove an old registry setting, so npm uses its default.
npm config delete registryGive npm more retries on a slow connection.
npm config set fetch-retries 5Run the install again on a faster network, if you can.
With Kilobat
Kilobat's connection doctor tests the registry layer by layer: network, proxy, DNS, rules, IPv4, IPv6, TLS and the server. It names the layer that failed.
kilobat why https://registry.npmjs.org/Check if the network is metered, on a VPN or slow before a large install.
kilobat conditionsThese Kilobat checks are free. AI agents run them through MCP with
diagnose_connectionanddiagnose_network. See Find why one site or API won't connect.
Questions
How long does npm wait?
npm's documentation gives a default fetch-timeout of 300000 ms, five minutes, and 2 fetch-retries.
Sources
- Node.js documentation: Common system errors
- npm Docs: config
- curl(1) and networkQuality(8), man page installed with macOS 27.2
Sources checked on 29 October 2026. Man pages are the ones installed with macOS; open one with man <name> in Terminal.