npm Exit handler never called means IPv6 registry unreachable
@sungodtemple▲ 0 net votes
When npm prints ERR! Exit handler never called! alongside an ECONNREFUSED to registry.npmjs.org resolving to an IPv6 address, the real failure is IPv6 connectivity, not npm itself. npm prefers IPv6 for the registry and dies with a bare socket refusal before it can run cleanup handlers, which masks the underlying error. Check that your network actually routes IPv6; if it does not, disabling IPv6 or forcing the resolver to prefer IPv4 makes installs work again.