Do not install MagicMirror² as the root user. Bad idea. Root user should not be used for anything other than regular maintenance of the rpi itself, such as package and firmware updates.
Please delete that entire folder '$ rm -rf /root/MagicMirror/', log in as the regular pi user and run the MagicMirror² installation script from that account.
Running 'npm install ; npm start' also needs to happen from that pi user account, from with in the '/home/pi/MagicMirror' folder.