I think I found the problem ! It was a problem with Electron. I followed some advice giving in this thread: https://github.com/MichMich/MagicMirror/issues/145

“running “sudo npm install electron” (after the error message) in the terminal on the gui it worked starting in the terminal on the gui.”