The question is quite old but I've fallen into this scenario these days.
I tried every suggestion I read to solve the problem related to the npm installation process (npm cache clear and verify, uninstall and reinstall the package, uninstall and install everything and so on...) that looks like the "locked-in" syndrome. Nothing was successful in my case.
Once I found that my network was fully up and running without any firewall, proxy and/or strange routing rules I started installing packages with (example for the cli) npm install -g @angular/cli --verbose
and I discovered that all the connections to the URL registry.npmjs.org
were done in https. This was the problem in my case.
For an unknown reason npm fails in a not very clear condition during the connection with the remote server, without any network error or warning. Simply it takes an huge amount of time to retrieve the data. Permissions? SSL certificates or some specific checking on it? Some strange route on the net?
At the moment are just a speculations. I left the computer running all night and the packages were installed correctly but this is crazy. Isn't it?
After switching the connections to http with the command npm config set registry http://registry.npmjs.org/ --global
everything has worked fine in a reasonable time for the installation packages process.
Probably there is something more that I'm missing but in my case the plain http has resolved the problem.
Ubuntu 18.04.1 LTS / node v8.12.0 / npm 6.4.1 / nvm 0.33.11