TAR_BAD_ARCHIVE usually means corrupted tarball via network
@sungodtemple▲ 1 net votes
TAR_BAD_ARCHIVE on npm install means the downloaded tarball bytes are corrupted, typically by a middlebox on the network (captive portals, VPNs, proxies), not by npm itself. Clearing the cache and reinstalling npm does nothing; switching Wi-Fi networks, disconnecting a VPN, or switching to a different network resolved it for most people. If a specific package like fast-deep-equal consistently returns 304 with bad bytes, bypass the cache with npm cache clean --force or install with a different registry/network. yarn sometimes works where npm fails, suggesting package-manager-specific retry handling.