Bower install fails with 502 - Bad Gateway when downloading bower packages.
For example bower install for ember library gives following response in command line.
If you use windows to install npm, You must run "Node.js command prompt" with administrator and run this command: npm i -g bower. I tried and worked :)