Closed samzepstein closed 5 years ago
npm start dev
needs to be ran inside the MagicMirror folder, not the awesome-alexa one
There are many things wrong with your config syntactic wise.
Use this tool to double check:
Thank you for the quick response. I put my config code in espirma and it said it was syntactically valid. Also, I ran npm start dev in the MagicMirror folder and it freezed the developer console and I had to restart the pi. Still getting the black screen.
When I take out the MMM-awesome-alexa module, the mirror loads fine. Any reason why this could happen?
Here is what I get when I run npm start dev in the MagicMirror folder
From what I can see, it cannot find snowboy
Try to run npm run electron-rebuild
, or downgrade your node version, what is it currently?
hi i ran into the same issue as him as well i'm running node version 8 but it seems that electron-rebuild can't work for me and i instead manually installed snowboy but even if its installed,They gave me that they can't find node-abi ver 2.0.16 which is an invalid version which i may be wondering if you made an error in this module?
My node version is v11. 6. 0. How do I downgrade? AndI posted above what happens when I run npm run electron-rebuild.
It looks like npm run --electron-rebuild works for me.
Idk why but I thought that was just to state what is included in the script and not really the true electron rebuild as dolanmiu said that we should only use npm run electron rebuild but not npm run - -electron-rebuild
And the module itself is not supporting nodejs ver. 11 so I have no idea how you get past the npm install =prod
I found a way to load the modules but now I’m unsure if the awesome Alexa module is working but yea I found a file which is an arm file and I renamed it to electron-v2.0-linux-arm. Which mainly first solve the black screen issue but idk if the module for Alexa works as now it’s a temporary fix before dolanmiu decides to fix this
I changed node-v57-linux-arm into electron-v2.0-arm maybe it’s one of the errors I find but after changing it the magic mirror works now but unsure if the Alexa function would work
I have confirmed that Alexa module now works perfectly
And to get electron-rebuild work properly
First open terminal and go to MMM-awesome-Alexa Then write this commands Npm install npm@latest -g Once it’s done install Npm install node-abi Then install Npm install electron-rebuild After all of it is done do Npm run electron rebuild it should be successful.
And now I’m wondering why visualization of words being said can’t work like it won’t show what I said
@tonytanjk amazing! So to confirm, the Alexa module is working for you now with the visualization? Also how did you manually install snowboy and find that arm file?
Thanks~
I am still trying to find a solution for visualization but yes I’m sure the Alexa module is working.
Here is how to access and change the name folders. Go to MagicMirror/modules/MMM-awesome-Alexa/node_modules/snowboy and find a file called node-v57-linux-arm and change it to electron-v2.0-linux-arm.
I actually did not have to install snow boy since npm run electron-rebuild will do that but I needed to find a solution and thought that manually installing snow boy would work but it didn’t instead I done something else to make it work which is already in the comments.Good luck
I have exactly the same issue as @samzepstein.
After having had problems with being able to install everything, I got that resolved partly thanks to @tonytanjk but now I am stuck with the same problem. My screen is simply black whenever I include the mmm-alexa module in the config. If I leave it out, all is fine. I have tried
First open terminal and go to MMM-awesome-Alexa Then write this commands Npm install npm@latest -g Once it’s done install Npm install node-abi Then install Npm install electron-rebuild After all of it is done do Npm run electron rebuild it should be successful.
As stated by @tonytanjk and all of the commands went off fine, but I still have the problem. Also I do not have a file called "node-v57-liinux-arm".
Any suggestions?
It’s node-v57-linux-arm but should be ok . imma try to show you where to get the folder since your able to go thru all of the installations I asked from.
Btw if you want to see what the terminal gave you after the black screen came up, press ctrl+alt it should show you a page on TOP and you can choose to minimise the MagicMirror so your able to check what happend
just to be clear, simply connect a keyboard and press ctrl+alt? Because that didnt do anything?
You mentioned the folder with the node-v57-linux-arm should be MagicMirror/modules/MMM-awesome-Alexa/node_modules/snowboy right?
Yes and I would need to check if ctrl+alt allows me to get a way to minimise screen looks like I’m forgetting it again :(
@tonytanjk when i run the last command i.e. npm install electron-rebuild I get this:
pi@raspberrypi:~/MagicMirror/modules/MMM-awesome-alexa $ npm install electron-rebuild
+ electron-rebuild@1.8.4
added 4 packages from 1 contributor, updated 4 packages, moved 1 package and audited 6804 packages in 51.215s
found 9 vulnerabilities (1 low, 8 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
does that mean something is wrong? what can I do?
@bachoo786 no it actually means you successfully installed electron rebuild which is a good way to start
@tonytanjk also when I run npm start dev in MagicMirror folder why does it get stuck in "Launching application"? I dont get any logs after that. Please see below:
pi@raspberrypi:~/MagicMirror $ npm start dev
> magicmirror@2.6.0 start /home/pi/MagicMirror
> sh run-start.sh "dev"
Starting MagicMirror: v2.6.0
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.
No helper found for module: currentweather.
No helper found for module: weatherforecast.
Initializing new module helper ...
Module helper loaded: MMM-Remote-Control
No helper found for module: random_quotes.
Initializing new module helper ...
Module helper loaded: MMM-homeassistant-sensors
Initializing new module helper ...
Module helper loaded: MMM-UKNationalRail
No helper found for module: MMM-TFL.
Initializing new module helper ...
Module helper loaded: newsfeed
All module helpers loaded.
Starting server on port 8080 ...
You're using a full whitelist configuration to allow for all IPs
Server started ...
Connecting socket for: updatenotification
Connecting socket for: MMM-Remote-Control
Starting node helper for: MMM-Remote-Control
Connecting socket for: MMM-homeassistant-sensors
Connecting socket for: MMM-UKNationalRail
MMM-UKNationalRail helper started ...
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Whoops! There was an uncaught exception...
{ Error: listen EADDRINUSE :::8080
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at new Server (/home/pi/MagicMirror/js/server.js:27:9)
at /home/pi/MagicMirror/js/app.js:219:18
at loadNextModule (/home/pi/MagicMirror/js/app.js:168:5)
at /home/pi/MagicMirror/js/app.js:163:6
at Class.loaded (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:19:3)
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
Launching application.
@tonytanjk after following your method of updating and getting rid of the black screen my MM broke and wouldnt be found by pm2 until I reboot my rpi. I had to do a fresh install of raspbian stretch and mm.
@dolanmiu If there are better instructions on installing this module it would be great.
I did not reference you to update your electron rebuild at all. @smartmirrorkits referenced it to you
I got these types of issue which you had before but it didn’t affect the Smart Mirror program at all. I think you should save your config.js file and do a fresh installation of MagicMirror again and use your old config file. See if it would work like try and error. I’m a student in Singapore so I would not really be too active in github due to time collision so might expect me to not answer for quite a while.
Having the same error Error:
Cannot find module 'snowboy'
at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (internal/modules/cjs/loader.js:528:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.
Sorry I won’t be able to answer now as I do not have access to my raspberry pi and this whole week including next week I have exams so I would not be able to help. Sorry for the inconvenience.
Don't worry, thanks for the reply anyway :)
Can you try to find the file node-v57-Linus-arm
Node-v57-linux-arm*
Node-v57-linux-arm*
Which folder should have this file?
I tried: find /home/pi/files/ -name "Node-v57-linux-arm" and I got: find: ‘/home/pi/files/*’: No such file or directory
Here is how to access and change the name folders. Go to MagicMirror/modules/MMM-awesome-Alexa/node_modules/snowboy and find a file called node-v57-linux-arm and change it to electron-v2.0-linux-arm.
Please manually find it and change it.
Sorry my previous comment was deleted by mistake, here is the question I have: I am have the problem of black screen once I add the config to the file. I followed the steps you mentioned: cd ~/MagicMirror/modules/MMM-awesome-alexa $ sudo npm install npm@latest -g but once I run npm install node-abi I get an error. Here is what I am getting:
pi@raspberrypi:~/MagicMirror/modules/MMM-awesome-alexa $ sudo npm install npm@latest -g /usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js /usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2019-04-29T21_11_00_766Z-debug.log pi@raspberrypi:~/MagicMirror/modules/MMM-awesome-alexa $ sudo npm install node-abi npm ERR! code ENOLOCAL npm ERR! Could not install from "node_modules/cspell/configstore@git+https:/github.com/Jason3S/configstore.git#101c774d74ad458618ee26a9825bc1da1b958154" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-04-29T21_11_42_946Z-debug.log pi@raspberrypi:~/MagicMirror/modules/MMM-awesome-alexa $ sudo npm install node-abi
Hmm I will try to get it checked once I’m at home? Because now I’m going to school and do not have access to the pi I will check it for you and see if I get the same mistake later on?
I would suggest that you can go through the past comments and try to find the answers there for now. Thank you
Though most people would be thinking why a 13 year old kid would be working on complex raspberry pi stuff but I love them anyways and I love to help people who are determined to get their Projects working how the way they wanted.
I really appreciate your help. I think snowboy is not installed because I can not find the folder inside MagicMirror/modules/MMM-awesome-Alexa/node_modules/snowboy but not sure how to install it or where should I install it. Any idea? Good luck in your school.
Ok I run npm run electron-rebuild
and it seems to be installed
pi@raspberrypi:~/MagicMirror/modules/MMM-awesome-alexa $ npm run electron-rebuild
mmm-awesome-alexa@1.0.0 electron-rebuild /home/pi/MagicMirror/modules/MMM-awesome-alexa electron-rebuild --pre-gyp-fix
✔ Rebuild Complete
and still a black screen!
Ok the rebuild is a good start
I would wish that github would allow pictures or videos to be sent out but sadly they do not have it
Im omw home right now and will get to my raspberry pi ASAP.
Thank you very much for doing this, I am almost giving up on this project. Alexa does not seem to like me 😂
Nah it’s just some errors on the MagicMirror files itself hopefully @dolanmiu can fix these errors and put in a new release.
Ok.. So after reading all the issues on Github in this module and doing all the steps mentioned in all issues, I am still having a problem getting this to work. I see that many said that its a snowboy issue. and I searched for the snowboy folder and could not find it so I tried installing it and still ending up with the same error.
pi@raspberrypi:~/MagicMirror/modules/MMM-awesome-alexa $ npm install --save snowboy npm ERR! code ENOLOCAL npm ERR! Could not install from "node_modules/cspell/configstore@git+https:/github.com/Jason3S/configstore.git#101c774d74ad458618ee26a9825bc1da1b958154" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2019-05-10T21_42_57_860Z-debug.log pi@raspberrypi:~/MagicMirror/modules/MMM-awesome-alexa $
I have written a documentation site on how to install this module and how to fix snowboy issues:
https://awesome-alexa.js.org/#/installation?id=install-module
Thanks for the work @dolanmiu
My pleasure
If there are any issues, open a new issue, this issue is getting out of hand and off topic
Thanks
Hi,
So I installed everything, audio and sound set up properly, but keep running into this black screen problem when I put the module into the config file. When I take it out it works fine. I also have AlexaPi installed, not sure if that makes a difference.
Here is my code below for the config (replaced Api keys and IDs with dummy text):
`
I also noticed that I was getting errors when running npm run electron-rebuild but not npm run --electron-rebuild. I already installed node-abi as well. My node version is v11. 6. 0
I tried pulling logs on the Mirror but I get a black screen and the pi freezes.
Also from npm dev:
I also checked and saw that my temp file was empty. Any help on troubleshooting would be amazing thank you!!