MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    can't run "npm run start"

    Troubleshooting
    3
    25
    716
    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.
    • J
      jefftse last edited by

      I can do “npm run server” but not “npm run start”

      Any takers?

      magicmirror@2.11.0 start /home/jeff/MagicMirror
      DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

      No protocol specified

      (electron:17603): Gtk-WARNING **: 18:42:53.065: cannot open display: :0.0
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! magicmirror@2.11.0 start: DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      npm ERR! Exit status 1
      npm ERR!
      npm ERR! Failed at the magicmirror@2.11.0 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! /home/jeff/.npm/_logs/2020-06-23T22_42_53_102Z-debug.log

      A S 2 Replies Last reply Reply Quote 0
      • A
        actimbar @jefftse last edited by

        @jefftse i had an error yesterday on a clean installation of raspberrian with npm and electron was involved, but I did it from another virtual desktop, (working with unencrypted VNC server) working on finding a solution.

        S 1 Reply Last reply Reply Quote 0
        • S
          sdetweil @jefftse last edited by

          @jefftse what os platform is this?

          did you do manual install or use the script?

          Sam

          Create a working config
          How to add modules

          J 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @actimbar last edited by

            @actimbar did u use the install script?

            Sam

            Create a working config
            How to add modules

            A J 2 Replies Last reply Reply Quote 0
            • A
              actimbar @sdetweil last edited by

              @sdetweil by VNC desktop, I got stuck on step 4 of manual installation (npm install), I made a reboot before the error, now I’m trying (npm install) without VNC.
              Now installation ended successfully!

              1 Reply Last reply Reply Quote 0
              • J
                jefftse @sdetweil last edited by

                @sdetweil

                Raspberry pi 4 raspbrian

                1 Reply Last reply Reply Quote 0
                • J
                  jefftse @sdetweil last edited by

                  @sdetweil

                  I did and the same thing

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    sdetweil @jefftse last edited by sdetweil

                    @jefftse are u doing this over vnc without a real display?

                    the start script assumes a real display
                    change the package.json start to match your config

                        "start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
                    

                    the start command is

                    npm start 
                    

                    Sam

                    Create a working config
                    How to add modules

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      jefftse @sdetweil last edited by

                      @sdetweil

                      I tried both. I even deleted the whole folder and reinstalled. Maybe electron is the problem.

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        sdetweil @jefftse last edited by sdetweil

                        @jefftse no, change the line in package.json
                        from

                         "start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
                        

                        to

                         "start": "./node_modules/.bin/electron js/electron.js",
                        

                        the error is " cannot open display: :0.0" typically, DISPLAY:0 is the physical display

                        Sam

                        Create a working config
                        How to add modules

                        J 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy