• 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.

npm start dev

Scheduled Pinned Locked Moved Troubleshooting
13 Posts 5 Posters 13.3k Views 4 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.
  • B Offline
    Bangee Module Developer
    last edited by Sep 16, 2016, 6:44 AM

    Hi there

    I try to start my mirror whit npm start dev to do some debugging but there are always a lot of errors. What’s wrong here?

    pi@raspberrypi:~/MagicMirror $ npm start dev
    
    > magicmirror@2.0.0 start /home/pi/MagicMirror
    > electron js/electron.js "dev"
    
    
    npm ERR! Linux 4.4.13-v7+
    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "dev"
    npm ERR! node v6.4.0
    npm ERR! npm  v3.10.3
    npm ERR! code ELIFECYCLE
    npm ERR! magicmirror@2.0.0 start: `electron js/electron.js "dev"`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the magicmirror@2.0.0 start script 'electron js/electron.js "dev"'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, 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!     electron js/electron.js "dev"
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs magicmirror
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls magicmirror
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/pi/MagicMirror/npm-debug.log
    
    1 Reply Last reply Reply Quote 0
    • S Offline
      shavesophere
      last edited by paviro Sep 27, 2016, 9:02 PM Sep 16, 2016, 8:10 AM

      Hi Bangee

      I’ve had exactly the same problem. I’ve tried it on a rasp 2, a rasp 3 and still the same result. Tried reinstalling node.js, reinstalling npm. I’m beginning to think there’s something up with Mich;s installation script but I cant find any clues in the output. Apparently it’s known that sometimes electron will fail on some rasp 2’s- so i went ou t and bought a rasp 3. I’m currently trying it again on a new card - if it doesn’t work this time i’ll try the manual install method. No luck yet.

      pi@magicpi:~ $ cd MagicMirror/config
      pi@magicpi:~/MagicMirror/config $ cp config.js.sample config.js
      pi@magicpi:~/MagicMirror/config $ cd $HOME/MagicMirror
      pi@magicpi:~/MagicMirror $ npm start
      
      > magicmirror@2.0.0 start /home/pi/MagicMirror
      > electron js/electron.js
      
      
      npm ERR! Linux 4.4.11-v7+
      npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
      npm ERR! node v6.6.0
      npm ERR! npm  v3.10.3
      npm ERR! code ELIFECYCLE
      npm ERR! magicmirror@2.0.0 start: `electron js/electron.js`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the magicmirror@2.0.0 start script 'electron js/electron.js'.
      npm ERR! Make sure you have the latest version of node.js and npm installed.
      npm ERR! If you do, 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!     electron js/electron.js
      npm ERR! You can get information on how to open an issue for this project with:
      npm ERR!     npm bugs magicmirror
      npm ERR! Or if that isn't available, you can get their info via:
      npm ERR!     npm owner ls magicmirror
      npm ERR! There is likely additional logging output above.
      
      npm ERR! Please include the following file with any support request:
      npm ERR!     /home/pi/MagicMirror/npm-debug.log
      

      Note from admin: Please use Markdown on code snippets for easier reading!

      1 Reply Last reply Reply Quote 0
      • O Offline
        ostfilinchen
        last edited by Sep 16, 2016, 9:09 AM

        Hey!

        in the readme i found this:

        Important: npm start does not work via SSH, use DISPLAY=:0 nohup npm start & instead. This starts the mirror on the remote display.

        1 Reply Last reply Reply Quote 0
        • S Offline
          shavesophere
          last edited by Sep 16, 2016, 9:12 AM

          Thanks ost - but I have tried it both from direct physical keyboard and SSH using this command. I’ve been reading a few other problems related to this issue but all seems to come down to “not installing as root user”. Which i’m not - I’m installing as pi. So still scratching my head here.

          1 Reply Last reply Reply Quote 1
          • O Offline
            ostfilinchen
            last edited by Sep 16, 2016, 9:32 AM

            do you have create an mm.sh and starts this with pm2?

            S 1 Reply Last reply Sep 16, 2016, 9:33 AM Reply Quote 0
            • S Offline
              shavesophere @ostfilinchen
              last edited by Sep 16, 2016, 9:33 AM

              @ostfilinchen I was just using the standard install script that comes on the tutorial.

              curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash

              1 Reply Last reply Reply Quote 0
              • O Offline
                ostfilinchen
                last edited by Sep 16, 2016, 9:43 AM

                and do u do these steps: https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror

                1 Reply Last reply Reply Quote 0
                • B Offline
                  Bangee Module Developer
                  last edited by Sep 16, 2016, 10:09 AM

                  hey there
                  @ostfilinchen that’s it. to start npm from my shell it need to use this command:
                  DISPLAY=:0 npm start dev

                  But with this I can not debug my script. Electron crashes alwasy on startup when I’ve activated my new module using const sensorLib = require('node-dht-sensor') in my node_helper.js

                  How can I debug this error?

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    shavesophere
                    last edited by Sep 21, 2016, 2:19 PM

                    OK i think i’ve solved it. magic mirror HAS to be started (npm start) from a terminal window in the x-window server. you cannot start it over ssh.

                    B K 2 Replies Last reply Sep 22, 2016, 1:32 AM Reply Quote 1
                    • B Offline
                      bhepler Module Developer @shavesophere
                      last edited by Sep 22, 2016, 1:32 AM

                      @shavesophere Thank you. This at least got me to the point where I can show the display on a monitor. Now I just have to walk to the other room to see my changes. :/

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