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.

    Starting up MM via SSH don't work

    Scheduled Pinned Locked Moved Solved Troubleshooting
    8 Posts 2 Posters 1.9k 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.
    • G Offline
      grimorth @grimorth
      last edited by

      @grimorth Update. I managed to get rid of all node versions and installed 10.0 but I can’t start npm now. It says
      root@raspberrypi:~/MagicMirror# npm -v -su: /usr/local/bin/npm: No such file or directory

      I tried apt-get install npm but without luck…

      1 Reply Last reply Reply Quote 0
      • G Offline
        grimorth
        last edited by

        Update.
        After reboot node and npm are up to date. However I still can’t start up MM via SSH. From PI terminal it works like a charm.

        root@raspberrypi:~/MagicMirror# DISPLAY=:0 npm start
        
        > magicmirror@2.4.1 start /root/MagicMirror
        > sh run-start.sh
        
        No protocol specified
        
        (electron:942): Gtk-WARNING **: cannot open display: :0
        npm ERR! code ELIFECYCLE
        npm ERR! errno 1
        npm ERR! magicmirror@2.4.1 start: `sh run-start.sh`
        npm ERR! Exit status 1
        npm ERR! 
        npm ERR! Failed at the magicmirror@2.4.1 start script.
        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
        
        npm ERR! A complete log of this run can be found in:
        npm ERR!     /root/.npm/_logs/2018-09-23T00_09_27_111Z-debug.log
        root@raspberrypi:~/MagicMirror# DISPLAY=:0.0 npm start
        
        > magicmirror@2.4.1 start /root/MagicMirror
        > sh run-start.sh
        
        No protocol specified
        
        (electron:965): Gtk-WARNING **: cannot open display: :0.0
        npm ERR! code ELIFECYCLE
        npm ERR! errno 1
        npm ERR! magicmirror@2.4.1 start: `sh run-start.sh`
        npm ERR! Exit status 1
        npm ERR! 
        npm ERR! Failed at the magicmirror@2.4.1 start script.
        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
        
        npm ERR! A complete log of this run can be found in:
        npm ERR!     /root/.npm/_logs/2018-09-23T00_09_42_728Z-debug.log
        

        Error log:

        root@raspberrypi:~/.npm/_logs# cat 2018-09-23T00_09_42_728Z-debug.log 
        0 info it worked if it ends with ok
        1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
        2 info using npm@6.4.1
        3 info using node@v10.11.0
        4 verbose run-script [ 'prestart', 'start', 'poststart' ]
        5 info lifecycle magicmirror@2.4.1~prestart: magicmirror@2.4.1
        6 info lifecycle magicmirror@2.4.1~start: magicmirror@2.4.1
        7 verbose lifecycle magicmirror@2.4.1~start: unsafe-perm in lifecycle true
        8 verbose lifecycle magicmirror@2.4.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/MagicMirror/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        9 verbose lifecycle magicmirror@2.4.1~start: CWD: /root/MagicMirror
        10 silly lifecycle magicmirror@2.4.1~start: Args: [ '-c', 'sh run-start.sh' ]
        11 silly lifecycle magicmirror@2.4.1~start: Returned: code: 1  signal: null
        12 info lifecycle magicmirror@2.4.1~start: Failed to exec start script
        13 verbose stack Error: magicmirror@2.4.1 start: `sh run-start.sh`
        13 verbose stack Exit status 1
        13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
        13 verbose stack     at EventEmitter.emit (events.js:182:13)
        13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
        13 verbose stack     at ChildProcess.emit (events.js:182:13)
        13 verbose stack     at maybeClose (internal/child_process.js:962:16)
        13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
        14 verbose pkgid magicmirror@2.4.1
        15 verbose cwd /root/MagicMirror
        16 verbose Linux 4.14.70-v7+
        17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
        18 verbose node v10.11.0
        19 verbose npm  v6.4.1
        20 error code ELIFECYCLE
        21 error errno 1
        22 error magicmirror@2.4.1 start: `sh run-start.sh`
        22 error Exit status 1
        23 error Failed at the magicmirror@2.4.1 start script.
        23 error This is probably not a problem with npm. There is likely additional logging output above.
        24 verbose exit [ 1, true ]
        Mykle1M 1 Reply Last reply Reply Quote 0
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer @grimorth
          last edited by

          @grimorth

          Ok, now that your node and npm are up to date, I wouldn’t say reinstall MM just yet. Not until you’ve heard from a few others about your issue.

          In the meantime, would you try DISPLAY=:0 nohup npm start &

          I think that sh does not like DISPLAY=:0 npm start and will not work

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • G Offline
            grimorth
            last edited by

            @Mykle1 I tried your solution earlier but result was still the same.

            I also managed to fix everything :)
            I reinstalled whole rasbian, because I really messed up and when I tried to star MM directly on PI, it was showing only black screen. Then I installed MM directly on PI.
            Earlier I was installing it via SSH. Shouldn’t be the issue yet it was…
            Now everything runs smooth, I can start MM directly and via SSH with both commands DISPLAY=:0 nohup npm start & and DISPLAY=:0 npm start.

            Thanks for all support :)

            Mykle1M 1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @grimorth
              last edited by

              @grimorth

              Life is good. Enjoy!

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                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