Reason: Downloding electron takes for ages as the download was below 1kb/s.
Solution: Executing the following command using a faster chinese mirror:
ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ npm install --prefix ~/MagicMirror electron --save-dev