Read the statement by Michael Teeuw here.
Black blank screen
-
@dhirajv12 Never seen this. Googled it. Found this.
If it works now, I wouldn’t worry too much. -
@Anhalter42
Now i did installation from scratch…
these are the warnings
Cloning MagicMirror Done!
Installing dependencies …npm WARN stylelint-config-standard@16.0.0 requires a peer of stylelint@^7.8.0 but none was installed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.6.10 postinstall:node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.6.10 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.╭─────────────────────────────────────╮
│ │
│ Update available 4.6.1 → 5.0.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2017-05-31T03_13_15_771Z-debug.log
Unable to install dependencies!should I send u the log file… will it be of any help…
this must be the 10th time I am instaling from scratch …I could not get it working… -
@Anhalter42
After I found that it failed at electron. I installed it with
sudo npm install electron:1.6.9 -g
after that I did cd /MagicMirror npm start.
MagicMirror did pop up but with a message that if did not find the config file. So there was a sample file in?magicMirror/config folder. I remaned it to config.js from config.js.sample.
I ran it, then the screen went black…
The contents of config file looks like this…- Magic Mirror Config Sample
- By Michael Teeuw http://michaelteeuw.nl
- MIT Licensed.
*/
var config = {
port: 8080,
ipWhitelist: [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”], // Set [] to allow all IP addresses.language: "en", timeFormat: 24, units: "metric", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "calendar", header: "US Holidays", position: "top_left", config: { calendars: [ { symbol: "calendar-check-o ", url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics" } ] } }, { module: "compliments", position: "lower_third" }, { module: "currentweather", position: "top_right", config: { location: "New York", locationID: "", //ID from http://www.openweathermap.org/help/city_list.txt appid: "YOUR_OPENWEATHER_API_KEY" } }, { module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "New York", locationID: "5128581", //ID from http://www.openweathermap.org/help/city_list.txt appid: "YOUR_OPENWEATHER_API_KEY" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" } ], showSourceTitle: true, showPublishDate: true } }, ]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== “undefined”) {module.exports = config;} -
@dhirajv12 I’m not really familiar with these errors. To me, it seems like you have some mismatch of versions, e.g. node being too old or too new. Did you try to update as mentioned in the output?
-
@dhirajv12 Try navigating to ~/MagicMirror/vendor then running npm install
-
Regarding “electron@1.6.10 postinstall”: There is an issue during installation with the extract-zip package which in turn results in a postinstall problem with electron (visible sign: There is no path.txt file in the node_modules/electron folder. Starting MM gives you the error message ‘Electron failed to install correctly, please delete node_modules/electron and try installing again’).
As far as I understand, extract-zip is now version 1.6.4 and with this version, postinstall on electron fails.
This post helped: https://forum.magicmirror.builders/topic/2460/magicmirror-fails-to-install-during-electron-installation/2
I am still struggeling with the black blank screen (and I have to further look into this), but the electron installation can be fixed by issuing (as taken from the referenced post - actually a downgrade of the extract-zip package):
npm uninstall extract-zip npm install extract-zip@1.6.0 npm install electron
Note: I am a noob, yet… ;-)
Regards,
HerrB92 -
So, at least for my installation I was able to sort things out. This also included as well re-installing Raspbian, but I just wanted to have a clean installation. The main culprit seem to be the node.js version which is important to be at least from the V7 branch (V8 not tested, my system shows v0.10.x before any installation steps) and an issue with the automated installation script:
Problem in automated installation script:
It tests for node.js V5.1.x and if not or only an earlier version is found, asks to install node.js from the V6 branch. Even with the latest node.js version from V6 the installation of electron fails in a postinstall step due to a problem in the extract-zip package (yes, complicated, indeed).Indicator for the problem in the electron installation is a missing path.txt file which should be in the electron sub folder and the message “Electron failed to install correctly, please delete node_modules/electron and try installing again” if MM is tried to be started.
Even, if the electron installation is fixed as described before, you will just get a black screen: MM starts, but all areas remain empty which is optically “a black screen”. This (and actually the other problems as well) can be fixed by installing the node.js version of the V7 branch before installation.
Additionally, due to the problems during the installation the final steps, e.g. creating the config file and asking, if the automatic start manager PM2 should be used, are not executed.
Hint: You can check the node.js version by issuing:
node -v
Clean installation steps:
- Optional: Re-install Raspbian to get a clean system
- Update Raspbian:
sudo apt-get update sudo apt-get upgrade
- Reboot
- Update to node.js V7.x (if you have already installed and used node.js of the V8.x branch then you may not like to execute the following lines) as described on node.js project website:
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo apt-get install -y nodejs
- Get and install MagicMirror (without starting it) from the PI home folder:
git clone https://github.com/MichMich/MagicMirror cd ~/MagicMirror npm install
- Fix complaints about global scripts (may be optional, requires sudo due to the global option as special folders have to be accessed):
sudo npm install --global stylelint sudo npm install --global coffeescript
- Execute post installation steps from the automatic installation script to make it perfect:
cp ~/MagicMirror/config/config.js.sample ~/MagicMirror/config/config.js sudo mkdir /usr/share/plymouth/themes/MagicMirror sudo cp ~/MagicMirror/splashscreen/splash.png /usr/share/plymouth/themes/MagicMirror/splash.png sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth /usr/share/plymouth/themes/MagicMirror/MagicMirror.plymouth sudo cp ~/MagicMirror/splashscreen/MagicMirror.script /usr/share/plymouth/themes/MagicMirror/MagicMirror.script
- Optional: If you would like to autostart MM and to install the automatic start tool PM2:
sudo npm install -g pm2 sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi" pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json pm2 save
Steps in 7&8 taken from the automatic script: https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh
Oh, start MM, if you a directly working on the system (no SSH/Putty connection):
npm start
or while using a SSH/Putty connection:
DISPLAY=:0 nohup npm start &
Regards,
HerrB92