npm install fails with "npm ERR! tar.unpack untar error"

Problem npm failed randomly while installing packages. It didn’t matter which packages or if running on Debian itself or inside virtual machines using Ubuntu (vagrant). Upgrading npm to the latest version (sudo npm install -g npm@latest) and clearing npm’s cache (npm cache clean) didn’t help either. After examining the downloaded temporary packages in /tmpI realized that they were corrupt. The corrupt packages changed randomly on every download attempt. Changing the temporary directory from /tmpto another location did not resolve the issue....

April 25, 2016