Developing MagicMirror on Windows
I have been developing my custom modules for the Magic Mirror software on my old laptop. Windows is the operating system, but I have been using Windows Subsystem for Linux (WSL) to develop it. I assume I didn’t get it to run on Windows when I started, but people have done it so I should try it out again soon. Anyway, on my old laptop I managed to run Magic Mirror in WSL 1, which I could not reproduce on my stationary… so for future reference, here is how I run Magic Mirror software on Windows in WSL 2.
Magic Mirror in WSL 2
Follow the official guide on how to install WSL 2.
Follow the manual installation guide on Magic Mirror.
For me it failed on npm install
with the error: : not found.sh: 4:
. In this step it tried to run some sh scripts
sh untrack-css.sh && sh installers/postinstall/postinstall.sh
the solution were simply to run these scripts as you would in your own shell. With Git Bash ./untrack-css.sh
for example.
Then it failed on line 4: $'\r': command not found
. The solution for this were to change from Windows style line endings (CRLF) to Linux style (LF) before running the script again.
It then failed on npm start
with ./run-start.sh: not found
. Solution was once again to change line endings to LF.