Read the statement by Michael Teeuw here.
How I got my Magic Mirror working on a Raspberry Pi 0 (zero)
-
@Hawking
module.js:339
throw err;
^Error: Cannot find module ‘express’
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/home/pi/MagicMirror/js/server.js:8:15)
at Module._compile (module.js:435:26)
at Object.Module._extensions…js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)and then the browser loads and says it cannot find http://localhost:8080
-
@SebTota I went to my old image from before the update and thats still working fine, but when I updated it, it again had the error come up. The only difference is last time I did the update it said Error: Cannot find module ‘colors’
-
@SebTota
I still don’t understand what update you are referring to.
Both error messages sound like there are modules missing (either “express” or “colors”).What happens if you do
cd ~/MagicMirror && sudo npm install cd ~/MagicMirror/vendor && npm install
-
@Hawking My MagicMirror has been sitting for a long time. When I recently finished the frame to get the computer display and rpi zero out of my closet I booted the rpi zero and on the top of the display it said A New Version of Magic Mirror is available or something along those lines. So I went into the MagicMirror folder and used the command “git pull && npm install” as specified in the README file of MagicMirror.
-
@SebTota said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):
git pull && npm install
Have there been errors when you did so?
I got
npm WARN lifecycle magicmirror@2.1.1~install: cannot run in wd %s %s (wd=%s) magicmirror@2.1.1 cd vendor && npm install /home/me/MagicMirror
Thats why I then did
cd ~/MagicMirror/vendor && npm install
in addition (see my post above). Maybe this also solves your problem.
-
@Hawking Sorry to keep bothering you but I ended up making it work with the two commands you told me to do. Now my problem is when the Pi Zero W is booting it connects to the WiFi but when magic mirror boots the pi disconnects.
-
@SebTota
Just to make sure that I understand the problem correctly:
You see the MagicMirror on the screen (Clock running etc). but you can no longer connect to the Pi Zero (using eg. ssh)?Just as a test:
What happens if you disable the MagicMirror from autostart (for example by moving the MagicMirror start script from /etc/init.d/ to your home directory) and start it manually while you are already logged in? I don’t know your exact setup or your Linux knowledge, if you need further help how to do this, just let me know. -
@Hawking I actually eventually got it working. Thanks so much for all your help!
-
Hello everyone.
I’ve followed the instructions and did everything in the comments (all 12 pages) to make sure I am doing them right. I was able to see MM2 thru the browser but on my screen, it is showing white screen.
Loading config ... Loading module helpers ... No helper found for module: alert. Initializing new module helper ... Module helper loaded: updatenotification No helper found for module: clock. Initializing new module helper ... Module helper loaded: calendar No helper found for module: compliments. No helper found for module: currentweather. No helper found for module: weatherforecast. Initializing new module helper ... Module helper loaded: newsfeed All module helpers loaded. Starting server on port 8080 ... Server started ... Connecting socket for: updatenotification Connecting socket for: calendar Starting node helper for: calendar Connecting socket for: newsfeed Starting module: newsfeed Sockets connected & modules started ... Ready to go! Please point your browser to: http://localhost:8080 Whoops! There was an uncaught exception... { [Error: listen EADDRINUSE :::8080] code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '::', port: 8080 } MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
mind helping me out with this?
-
@hoggboss22 your mm seems being excuted multiple. Common pitfal is that more than one browser are opened.(maybe your previous test running?)
Or your machine is already using port 8080.Kill all browsers(and node or npm) and restart. Or change port in your config like 8088.