• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Trying to install Manual and Automated

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 2 Posters 324 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    OptimisticShaggy
    last edited by Jun 25, 2020, 7:20 PM

    When following the Magic Mirror manual install, I could across this issue:

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
    2 info using npm@6.14.4
    3 info using node@v10.21.0
    4 verbose run-script [ 'prestart', 'start', 'poststart' ]
    5 info lifecycle magicmirror@2.11.0~prestart: magicmirror@2.11.0
    6 info lifecycle magicmirror@2.11.0~start: magicmirror@2.11.0
    7 verbose lifecycle magicmirror@2.11.0~start: unsafe-perm in lifecycle true
    8 verbose lifecycle magicmirror@2.11.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/MagicMirror/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
    9 verbose lifecycle magicmirror@2.11.0~start: CWD: /home/pi/MagicMirror
    10 silly lifecycle magicmirror@2.11.0~start: Args: [ '-c',
    10 silly lifecycle   'DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js' ]
    11 info lifecycle magicmirror@2.11.0~start: Failed to exec start script
    12 verbose stack Error: magicmirror@2.11.0 start: `DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js`
    12 verbose stack spawn ENOENT
    12 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
    12 verbose stack     at ChildProcess.emit (events.js:198:13)
    12 verbose stack     at maybeClose (internal/child_process.js:982:16)
    12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
    13 verbose pkgid magicmirror@2.11.0
    14 verbose cwd /home/pi/MagicMirror
    15 verbose Linux 4.19.118-v7+
    16 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
    17 verbose node v10.21.0
    18 verbose npm  v6.14.4
    19 error code ELIFECYCLE
    20 error syscall spawn
    21 error file sh
    22 error errno ENOENT
    23 error magicmirror@2.11.0 start: `DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js`
    23 error spawn ENOENT
    24 error Failed at the magicmirror@2.11.0 start script.
    24 error This is probably not a problem with npm. There is likely additional logging output above.
    25 verbose exit [ 1, true ]
    

    When following the Magic Mirror manual install by Sam, I have this log:

    install starting  - Thu Jun 25 14:09:52 EDT 2020
    installing on armv7l processor system
    the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
    Updating packages ...
    Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Hit:3 https://deb.nodesource.com/node_10.x buster InRelease Reading package lists...
    apt-get update  completed ok
    apt-get upgrade  started
    apt upgrade result =rc=0 Reading package lists...
    Building dependency tree...
    Reading state information...
    Calculating upgrade...
    The following package was automatically installed and is no longer required:
      rpi-eeprom-images
    Use 'sudo apt autoremove' to remove it.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Installing helper tools ...
    Reading package lists...
    Building dependency tree...
    Reading state information...
    build-essential is already the newest version (12.6).
    curl is already the newest version (7.64.0-4+deb10u1).
    git is already the newest version (1:2.20.1-2+deb10u3).
    unzip is already the newest version (6.0-23+deb10u1).
    wget is already the newest version (1.20.1-1.1).
    wget set to manually installed.
    The following package was automatically installed and is no longer required:
      rpi-eeprom-images
    Use 'sudo apt autoremove' to remove it.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Check current Node installation ...
    Node currently installed. Checking version number.
    Minimum Node version: v10.1.0
    Installed Node version: v10.21.0
    No Node.js upgrade necessary.
    Check current NPM installation ...
    NPM currently installed. Checking version number.
    Minimum npm version: V6.0.0
    Installed npm version: V6.14.4
    No npm upgrade necessary.
    Cloning MagicMirror ...
    Cloning MagicMirror Done!
    Installing dependencies ...
    
    > electron-chromedriver@6.0.0 install /home/pi/MagicMirror/node_modules/electron-chromedriver
    > node ./download-chromedriver.js
    
    
    > core-js@2.6.11 postinstall /home/pi/MagicMirror/node_modules/core-js
    > node -e "try{require('./postinstall')}catch(e){}"
    
    Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
    
    The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
    > https://opencollective.com/core-js 
    > https://www.patreon.com/zloirock 
    
    Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
    
    + eslint@7.3.1
    added 481 packages from 769 contributors and audited 775 packages in 63.015s
    
    25 packages are looking for funding
      run `npm fund` for details
    
    found 3 low severity vulnerabilities
      run `npm audit fix` to fix them, or `npm audit` for details
    Dependencies installation Done!
    fixing sandbox permissions
    setting up initial config.js
    Check plymouth installation ...
    plymouth is not installed.
    install and setup pm2
    pm2 not installed, installing
    pm2 install result /usr/bin/pm2 -> /usr/lib/node_modules/pm2/bin/pm2 /usr/bin/pm2-dev -> /usr/lib/node_modules/pm2/bin/pm2-dev /usr/bin/pm2-docker -> /usr/lib/node_modules/pm2/bin/pm2-docker /usr/bin/pm2-runtime -> /usr/lib/node_modules/pm2/bin/pm2-runtime npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/pm2/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) + pm2@4.4.0 added 185 packages from 191 contributors in 32.831s
    get the pm2 platform specific startup command
    startup command = sudo env PATH=$PATH:/usr/bin:/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
    
                            -------------
    
    __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
     _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
      _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
       _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
        _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
         _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
          _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
           _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
            _\///______________\///______________\///__\///////////////__
    
    
                              Runtime Edition
    
            PM2 is a Production Process Manager for Node.js applications
                         with a built-in Load Balancer.
    
                    Start and Daemonize any application:
                    $ pm2 start app.js
    
                    Load Balance 4 instances of api.js:
                    $ pm2 start api.js -i 4
    
                    Monitor in production:
                    $ pm2 monitor
    
                    Make pm2 auto-boot at server restart:
                    $ pm2 startup
    
                    To go further checkout:
                    http://pm2.io/
    
    
                            -------------
    
    [PM2] Init System found: systemd
    Platform systemd
    Template
    [Unit]
    Description=PM2 process manager
    Documentation=https://pm2.keymetrics.io/
    After=network.target
    
    [Service]
    Type=forking
    User=pi
    LimitNOFILE=infinity
    LimitNPROC=infinity
    LimitCORE=infinity
    Environment=PATH=$PATH:/usr/bin:/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
    Environment=PM2_HOME=/home/pi/.pm2
    PIDFile=/home/pi/.pm2/pm2.pid
    Restart=on-failure
    
    ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect
    ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all
    ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill
    
    [Install]
    WantedBy=multi-user.target
    
    Target path
    /etc/systemd/system/pm2-pi.service
    Command list
    [ 'systemctl enable pm2-pi' ]
    [PM2] Writing init configuration in /etc/systemd/system/pm2-pi.service
    [PM2] Making script booting at startup...
    [PM2] [-] Executing: systemctl enable pm2-pi...
    [PM2] [v] Command successfully executed.
    +---------------------------------------+
    [PM2] Freeze a process list on reboot via:
    $ pm2 save
    
    [PM2] Remove init script via:
    $ pm2 unstartup systemd
    pm2 startup command done
    configure the pm2 config file for MagicMirror
    start MagicMirror via pm2 now
    save MagicMirror pm2 config now
    stop MagicMirror via pm2 now
    We're ready! Run pm2 start MagicMirror from the ~/MagicMirror directory to start your MagicMirror.
    install completed - Thu Jun 25 14:15:09 EDT 2020
    

    Could someone mention what I am doing wrong?

    S 2 Replies Last reply Jun 25, 2020, 8:26 PM Reply Quote 0
    • S Away
      sdetweil @OptimisticShaggy
      last edited by Jun 25, 2020, 8:26 PM

      @OptimisticShaggy I don’t see a problem on my automated install

      so, then you can

      pm2 start MagicMirror
      

      or

      cd ~/MagicMirror
      npm start 
      

      log is just for history in case there are problems…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @OptimisticShaggy
        last edited by Jun 25, 2020, 8:28 PM

        @OptimisticShaggy u are running the full buster, right, not the cli version… you MUST run the desktop version to support graphics, which allows electron to run

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • O Offline
          OptimisticShaggy
          last edited by OptimisticShaggy Jun 25, 2020, 11:56 PM Jun 25, 2020, 11:04 PM

          No… I’m running the CLI version… Gonna be annoying if that is the reason.

          EDIT: With looking more into this, I was able to get it after a reinstall. After some research, I noticed that there a OS that Guysoft packaged together containing Raspbian lite in there. Is there anything we can do or any work currently to make MM work out of the box with Raspbian Lite and CLI?

          S 1 Reply Last reply Jun 26, 2020, 12:00 AM Reply Quote 0
          • S Away
            sdetweil @OptimisticShaggy
            last edited by sdetweil Jun 26, 2020, 2:07 AM Jun 26, 2020, 12:00 AM

            @OptimisticShaggy it will run in server mode.
            you have to have the desktop for a browser to work.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy