Read the statement by Michael Teeuw here.
Still going but I've hit a brickwall - Unable to install dependencies
-
Re: Beginner MagicMirror Install Issue - apt --fix-broken install
So I’m getting ever so closer hoping that someone out there will be able to help. I’m running the latest version of
Raspbian Stretch with desktop
Image with desktop based on Debian Stretch
Version: September 2017
Release date: 2017-09-07
Kernel version: 4.9I’ve done I don’t know how many Micro SD’s I’ve formatted and how many re-installs I’ve done, but I’ve finally managed to get MagicMirror2 installed or so I thought.
I get everything almost installed and then just at the end I get this…
Node.js installation Done! Cloning MagicMirror ... Cloning into 'MagicMirror'... remote: Counting objects: 8798, done. remote: Compressing objects: 100% (68/68), done. remote: Total 8798 (delta 46), reused 77 (delta 33), pack-reused 8695 Receiving objects: 100% (8798/8798), 11.32 MiB | 2.78 MiB/s, done. Resolving deltas: 100% (4968/4968), done. Cloning MagicMirror Done! Installing dependencies ... npm WARN prefer global coffee-script@1.10.0 should be installed with -g npm WARN prefer global jsonlint@1.6.2 should be installed with -g > uws@0.14.5 install /home/pi/MagicMirror/node_modules/uws > node-gyp rebuild > build_log.txt 2>&1 || exit 0 Unable to install dependencies!
It’s really frustrating I’ve been on this all day and thought I had finally cracked it with the good advice from lavolp3. But unfortunately I seem to have hit a brick wall any help would be gratefully appreciated. I’m new to all this so the more simple you can make it the better thanks.
-
@IDCreate said in Still going but I’ve hit a brickwall - Unable to install dependencies:
I’m new to all this so the more simple you can make it the better thanks.
First things first. Have you tried to run the mirror? The two warnings can be ignored and have no affect on the operation of the mirror. cd into the MagicMirror directory and run
npm start
and lets see what you get.You could also try this to install your missing dependencies:
In your terminal, cd into the MagicMirror directory and runnpm install
-
Thank you Mykle,
I’m a complete beginner and no nothing about C code or how to code a Raspberry Pi. I’m just learning as I go along so any help would be most useful.
I’ve not run the mirror and would’nt even know where to start to do this. I’m just following the instructions from the website. I came up with this issue and I’m totally stuck.
I’m just so grateful for people like you and this forum for yours, and everyone’s great knowledge. I’m very keen to learn, I’m dyslexic and it can some times take me longer than others to do things like this but I’m determined not to give up.
So if you would be so kind to assist me and advise me of to what you mean by
cd into the MagicMirror directory and run npm start and lets see what you get.
npm start
and lets see what you get.
Many thanks in advance for all your help.
-
Ok, mate, here we go.
- Open a terminal
- Type
cd MagicMirror
and press enter
Now your terminal will show that you are in the MagicMirror directory. - Type
npm start
and press enter
Now your mirror software will attempt to run
Tell me what happens when you do that
-
@Mykle1 thanks very much I don’t want to be a pain with all these questions.
So I tried what you’ve said and I get the code below:
pi@raspberrypi:~/MagicMirror $ npm start > magicmirror@2.1.3 start /home/pi/MagicMirror > sh run-start.sh /home/pi/MagicMirror/node_modules/electron/index.js:9 throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') ^ Error: Electron failed to install correctly, please delete node_modules/electron and try installing again at Object. (/home/pi/MagicMirror/node_modules/electron/index.js:9:9) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/pi/MagicMirror/node_modules/electron/cli.js:3:16) at Module._compile (module.js:570:32) npm ERR! Linux 4.9.59-v7+ npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" npm ERR! node v6.11.5 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! magicmirror@2.1.3 start: `sh run-start.sh` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the magicmirror@2.1.3 start script 'sh run-start.sh'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the magicmirror package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! sh run-start.sh npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs magicmirror npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls magicmirror npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/MagicMirror/npm-debug.log pi@raspberrypi:~/MagicMirror $
-
@Mykle1 I did manage to run the install as you mentioned as well before, it seems that I was in the cd MagicMirror section as you mentioned.
pi@raspberrypi:~/MagicMirror $ npm install > magicmirror@2.1.3 install /home/pi/MagicMirror > cd vendor && npm install magicmirror-vendors@ /home/pi/MagicMirror/vendor ├── font-awesome@4.7.0 ├── moment@2.19.1 ├── moment-timezone@0.5.13 └── weathericons@2.1.0 > magicmirror@2.1.3 postinstall /home/pi/MagicMirror > sh installers/postinstall/postinstall.sh && npm run install-fonts MagicMirror installation successful! > magicmirror@2.1.3 install-fonts /home/pi/MagicMirror > cd fonts && npm install magicmirror-fonts@ /home/pi/MagicMirror/fonts └── roboto-fontface@0.8.0 pi@raspberrypi:~/MagicMirror $ npm start > magicmirror@2.1.3 start /home/pi/MagicMirror > sh run-start.sh /home/pi/MagicMirror/node_modules/electron/index.js:9 throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') ^ Error: Electron failed to install correctly, please delete node_modules/electron and try installing again at Object. (/home/pi/MagicMirror/node_modules/electron/index.js:9:9) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/pi/MagicMirror/node_modules/electron/cli.js:3:16) at Module._compile (module.js:570:32) npm ERR! Linux 4.9.59-v7+ npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" npm ERR! node v6.11.5 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! magicmirror@2.1.3 start: `sh run-start.sh` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the magicmirror@2.1.3 start script 'sh run-start.sh'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the magicmirror package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! sh run-start.sh npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs magicmirror npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls magicmirror npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/MagicMirror/npm-debug.log pi@raspberrypi:~/MagicMirror $ npm start > magicmirror@2.1.3 start /home/pi/MagicMirror > sh run-start.sh /home/pi/MagicMirror/node_modules/electron/index.js:9 throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') ^ Error: Electron failed to install correctly, please delete node_modules/electron and try installing again at Object. (/home/pi/MagicMirror/node_modules/electron/index.js:9:9) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/pi/MagicMirror/node_modules/electron/cli.js:3:16) at Module._compile (module.js:570:32) npm ERR! Linux 4.9.59-v7+ npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" npm ERR! node v6.11.5 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! magicmirror@2.1.3 start: `sh run-start.sh` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the magicmirror@2.1.3 start script 'sh run-start.sh'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the magicmirror package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! sh run-start.sh npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs magicmirror npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls magicmirror npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/MagicMirror/npm-debug.log pi@raspberrypi:~/MagicMirror $
-
@IDCreate said in Still going but I’ve hit a brickwall - Unable to install dependencies:
‘Electron failed to install correctly, please delete node_modules/electron and try installing again’
No worries. Ok, lets correct the error being reported here. It’s actually telling you what to do.
From your desktop (not in the terminal) go to your MagicMirror folder and open it. Now open the node_modules folder. Find the electron folder (it just says electron). Delete the electron folder.
Now
- Open a terminal
- Type cd MagicMirror and press enter
Now your terminal will show that you are in the MagicMirror directory. - Type
npm install
and press enter
This will install the electron folder again and hopefully complete this time. When that completes: - Type
npm start
and press enter
Now your mirror software will attempt to run againg
Tell me what happens when you do that
-
@Mykle1 so I think I’ve done this as you have said. I went onto my desktop where you see the Raspberry Pi screen like you would a computer. I went to the folder you mentioned and deleted it. I then went ahead and followed your instructions. I then went to type
npm start
my screen flashed up on my desktop MagicMirror2 then dispersed and is showing on my main screen but says Please create a config file. See README for more information.Then below says If you get this message while your config file is already created, your config file probably contains an error. Use a JavaScript linter to validate your file?
I’m now unable to get to my pi via my desktop. For some strange reason after typing this I’ve just managed to get back onto my Pi via my desktop.
-
@IDCreate said in Still going but I’ve hit a brickwall - Unable to install dependencies:
I’m now unable to get to my pi via my desktop
Yes you can. Press your `Alt" key and a menu will drop down at the top. Move your mouse all the way to the top until you can see it. Far left menu you can Exit the mirror and back to your desktop.
I’ll have the directions for you to create your config in a moment.
You’ll be up and running in minutes, OK?
-
@IDCreate said in Still going but I’ve hit a brickwall - Unable to install dependencies:
Please create a config file.
Your mirror will be running by the time you finish following this very short tutorial that I wrote just for you. :-)
https://forum.magicmirror.builders/topic/4528/how-to-create-a-working-config-for-absolute-beginners