I think this could be the same issue with;
https://forum.magicmirror.builders/topic/8857/electron-error-cannot-open-display-0/5
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
M