Though there are already many good advice, for my environment(Windows 7, using PowerShell) and the last version available of node.js ( v8.1.2 ) all the above did not worked, except when I followed brunowego settings.
So check your settings with :
npm config list Settings behind a proxy:
npm config set registry http://registry.npmjs.org/ npm config set http-proxy http://username:password@ip:port npm config set https-proxy http://username:password@ip:port npm config set proxy http://username:password@ip:port npm set strict-ssl false Hope this will save time to someone