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 /tmp I realized that they were corrupt. The corrupt packages changed randomly on every download attempt. Changing the temporary directory from /tmp to another location did not resolve the issue. Every user on the machine was affected by the problem. ...