Read the statement by Michael Teeuw here.
Serveronly Mode Not Running
-
When i write node severonly, it shows error and i don’t know how to solve the problem.
I’m a complete newbie so can some senpai teach me what to do?
pi@raspberrypi:~/MagicMirror $ node serveronly
/home/pi/MagicMirror/js/app.js:260
process.on(“SIGINT”, () => {
^
SyntaxError: Unexpected token )
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/pi/MagicMirror/serveronly/index.js:1:73)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32) -
@kiritowu - Does running the Magic Mirror normally work? What happens when you enter
npm start
? -
@bhepler
Hey there, this is what i got when i write npm start. I’m using a raspberry zero and i’m just following all the step from this tutorials. https://forum.magicmirror.builders/topic/1183/how-i-got-my-magic-mirror-working-on-a-raspberry-pi-0-zero/8
pi@raspberrypi:~ $ cd MagicMirror
pi@raspberrypi:~/MagicMirror $ npm startmagicmirror@2.3.1 start /home/pi/MagicMirror
sh run-start.shrun-start.sh: 4: run-start.sh: electron: not found
npm ERR! magicmirror@2.3.1 start:
sh run-start.sh
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the magicmirror@2.3.1 start script.
npm ERR! 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 their info via:
npm ERR! npm owner ls magicmirror
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.11+
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “start”
npm ERR! cwd /home/pi/MagicMirror
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debiannpm ERR! Error: EACCES, open ‘npm-debug.log’
npm ERR! { [Error: EACCES, open ‘npm-debug.log’] errno: 3, code: ‘EACCES’, path: ‘npm-debug.log’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.npm ERR! System Linux 4.4.11+
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “start”
npm ERR! cwd /home/pi/MagicMirror
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open ‘npm-debug.log’
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/MagicMirror/npm-debug.log
npm ERR! not ok code 0 -
@kiritowu Ah. Pi Zero. Okay, let’s skip the interface and concentrate on the server only stuff. Let’s try to get the application to install. Try this:
cd ~/MagicMirror sudo npm install
This may take a while before it completes. But hopefully it will install all of the necessary software. Give it a go.