MagicMirror² v2.4.1 is available! For more information about this release, check out this topic.
Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!

ERROR IN STARTING MAGIC MIRROR IN PI ZERO



  • ERROR IN STARTING MAGIC MIRROR IN PI ZERO

    Recently, i’m working with magic mirror in pi zero and i’m just following 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
    However i seems like facing some sort of problem as my magic mirror won’t start up and just showing Error localhost:8080
    Hence i start the npm install again to check for any error and this is the code i get.
    I’m completely newbie this is the first time i’ve involve myself in coding
    Can someone who is kind enough to help me read my code and what to do next
    TQ

    pi@raspberrypi:~ $ sudo npm install
    npm ERR! install Couldn’t read dependencies
    npm ERR! package.json ENOENT, open '/home/pi/package.json’
    npm ERR! package.json This is most likely not a problem with npm itself.
    npm ERR! package.json npm can’t find a package.json file in your current directo ry.

    npm ERR! System Linux 4.4.11+
    npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install"
    npm ERR! cwd /home/pi
    npm ERR! node -v v0.10.29
    npm ERR! npm -v 1.4.21
    npm ERR! path /home/pi/package.json
    npm ERR! code ENOPACKAGEJSON
    npm ERR! errno 34
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR! /home/pi/npm-debug.log
    npm ERR! not ok code 0
    pi@raspberrypi:~ $ cd MagicMirror
    pi@raspberrypi:~/MagicMirror $ sudo npm install
    npm WARN engine spectron@3.7.3: wanted: {“node”:”>=0.12.4"} (current: {“node”:“0 .10.29”,“npm”:“1.4.21”})
    npm WARN engine webdriverio@4.12.0: wanted: {“node”:">= 4.8.5"} (current: {“node “:“0.10.29”,“npm”:“1.4.21”})
    npm WARN engine electron-download@4.1.0: wanted: {“node”:”>= 4.0”} (current: {“n ode”:“0.10.29”,“npm”:“1.4.21”})
    npm ERR! 404 Not Found
    npm ERR! 404
    npm ERR! 404 ‘types/node’ is not in the npm registry.
    npm ERR! 404 You should bug the author to publish it
    npm ERR! 404 It was specified as a dependency of 'electron’
    npm ERR! 404
    npm ERR! 404 Note that you can also install from a
    npm ERR! 404 tarball, folder, or http url, or git url.

    npm ERR! System Linux 4.4.11+
    npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install"
    npm ERR! cwd /home/pi/MagicMirror
    npm ERR! node -v v0.10.29
    npm ERR! npm -v 1.4.21
    npm ERR! code E404
    npm WARN engine path-exists@3.0.0: wanted: {“node”:”>=4"} (current: {“node”:“0.1 0.29”,“npm”:“1.4.21”})
    npm WARN engine env-paths@1.0.0: wanted: {“node”:">=4"} (current: {“node”:“0.10. 29”,“npm”:“1.4.21”})
    npm WARN engine sumchecker@2.0.2: wanted: {“node”:">= 4.0"} (current: {“node”:“0 .10.29”,“npm”:“1.4.21”})
    npm WARN engine deep-extend@0.4.2: wanted: {“node”:">=0.12.0",“iojs”:">=1.0.0"} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
    npm WARN engine hosted-git-info@2.6.0: wanted: {“node”:">=4"} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
    \

    electron-chromedriver@1.7.1 install /home/pi/MagicMirror/node_modules/spectron/node_modules/electron-chromedriver
    node ./download-chromedriver.js

    /home/pi/MagicMirror/node_modules/spectron/node_modules/electron-chromedriver/node_modules/electron-download/lib/index.js:3
    const debug = require(‘debug’)(‘electron-download’)
    ^^^^^
    SyntaxError: Use of const in strict mode.
    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/node_modules/spectron/node_modules/electron-chromedriver/download-chromedriver.js:3:24)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions…js (module.js:474:10)
    at Module.load (module.js:356:32)
    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.Debian

    npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/pi/MagicMirror/node_modules/spectron/node_modules/webdriverio/build/lib/protocol’
    npm ERR! error rolling back spectron@3.7.3 { [Error: ENOTEMPTY, rmdir ‘/home/pi/MagicMirror/node_modules/spectron/node_modules/webdriverio/build/lib/protocol’]
    npm ERR! error rolling back errno: 53,
    npm ERR! error rolling back code: ‘ENOTEMPTY’,
    npm ERR! error rolling back path: ‘/home/pi/MagicMirror/node_modules/spectron/node_modules/webdriverio/build/lib/protocol’ }
    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



  • A couple things. First, please use the markdown features of the forum to make your code easier to read. There’s a nice tutorial on Git.

    Secondly, you need to run the npm install command in the Magic Mirror folder. So try this:

    cd ~/MagicMirror
    npm install