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.

    Complete Walkthrough - Install MagicMirror on a PC - Windows 7/10

    Scheduled Pinned Locked Moved Troubleshooting
    324 Posts 55 Posters 783.2k Views 59 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.
    • A Offline
      airart @sdetweil
      last edited by

      @sdetweil is not working

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

      same errors

      C:\Users\gizmo\MagicMirror>npm start
      
      > magicmirror@2.15.0 start
      > node_modules/.bin/electron js/electron.js
      
      "node_modules" non è riconosciuto come comando interno o esterno,
       un programma eseguibile o un file batch.
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @airart
        last edited by

        @airart did u try to install electron?

        cd ~/MagicMirror
        npm install electron@11.3.0
        

        so we can see the error, if any

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        A 2 Replies Last reply Reply Quote 0
        • A Offline
          airart @sdetweil
          last edited by

          @sdetweil yes

          C:\Users\gizmo\MagicMirror>npm install  electron@11.3.0  --loglevel=verbose
          npm verb cli [
          npm verb cli   'C:\\Program Files\\nodejs\\node.exe',
          npm verb cli   'C:\\Users\\gizmo\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
          npm verb cli   'install',
          npm verb cli   'electron@11.3.0',
          npm verb cli   '--loglevel=verbose'
          n................ecc
          
          1 Reply Last reply Reply Quote 0
          • A Offline
            airart @sdetweil
            last edited by

            @sdetweil i try to restore original package.js and this show me a new log…

            0 verbose cli [
            0 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
            0 verbose cli   'C:\\Users\\gizmo\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
            0 verbose cli   'start'
            0 verbose cli ]
            1 info using npm@7.14.0
            2 info using node@v14.17.0
            3 timing npm:load:whichnode Completed in 8ms
            4 timing config:load:defaults Completed in 10ms
            5 timing config:load:file:C:\Users\gizmo\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 15ms
            6 timing config:load:builtin Completed in 15ms
            7 timing config:load:cli Completed in 8ms
            8 timing config:load:env Completed in 3ms
            9 timing config:load:file:C:\Users\gizmo\MagicMirror\.npmrc Completed in 1ms
            10 timing config:load:project Completed in 4ms
            11 timing config:load:file:C:\Users\gizmo\.npmrc Completed in 1ms
            12 timing config:load:user Completed in 1ms
            13 timing config:load:file:C:\Users\gizmo\AppData\Roaming\npm\etc\npmrc Completed in 1ms
            14 timing config:load:global Completed in 1ms
            15 timing config:load:validate Completed in 1ms
            16 timing config:load:credentials Completed in 5ms
            17 timing config:load:setEnvs Completed in 4ms
            18 timing config:load Completed in 53ms
            19 timing npm:load:configload Completed in 54ms
            20 timing npm:load:setTitle Completed in 1ms
            21 timing npm:load:setupLog Completed in 13ms
            22 timing npm:load:cleanupLog Completed in 14ms
            23 timing npm:load:configScope Completed in 0ms
            24 timing npm:load:projectScope Completed in 2ms
            25 timing npm:load Completed in 96ms
            26 timing config:load:flatten Completed in 15ms
            27 timing command:run-script Completed in 3ms
            28 timing command:start Completed in 57ms
            29 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\gizmo\MagicMirror\package.json'
            30 verbose cwd C:\Users\gizmo\MagicMirror
            31 verbose Windows_NT 10.0.18362
            32 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\gizmo\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
            33 verbose node v14.17.0
            34 verbose npm  v7.14.0
            35 error code ENOENT
            36 error syscall open
            37 error path C:\Users\gizmo\MagicMirror/package.json
            38 error errno -4058
            39 error enoent ENOENT: no such file or directory, open 'C:\Users\gizmo\MagicMirror\package.json'
            40 error enoent This is related to npm not being able to find a file.
            41 verbose exit -4058
            
            
            S 1 Reply Last reply Reply Quote 0
            • A Offline
              airart
              last edited by

              nothing to do, it doesn’t seem to find the electron file and folders

              1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @airart
                last edited by sdetweil

                @airart i don’t understand, I installed on windows 10 without trouble… but it was npm v6.

                I just installed and used npm 7.14…

                I had to use the full path to electron

                here is my package.json start line

                "start": "/Users/sdetw/MagicMirror/node_modules/.bin/electron js/electron.js",
                

                this is due to a change in npm… my prior instance will not start now without the full path

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                S A 2 Replies Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @sdetweil
                  last edited by

                  this is because npm 7.14 is trying to launch from the MagicMirror folder instead of the module folder…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    airart @sdetweil
                    last edited by

                    @sdetweil can i install npm v6 ?

                    S 1 Reply Last reply Reply Quote 0
                    • S Do not disturb
                      sdetweil @airart
                      last edited by

                      @airart yes,

                      npm install -g npm@6.14.0

                      after this completes

                      cd MagicMirror
                      rd /s/q node_modules
                      npm install
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      A 1 Reply Last reply Reply Quote 0
                      • A Offline
                        airart @sdetweil
                        last edited by

                        @sdetweil in which folder it should be installed

                        S 1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @airart
                          last edited by

                          @airart -g means global

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          A 1 Reply Last reply Reply Quote 0
                          • A Offline
                            airart @sdetweil
                            last edited by

                            @sdetweil it works ! I am so moved, evidently that was the problem.
                            Does CMD remain active how do I leave the MM? fn + f11 reduces to window
                            I also noticed some warnings

                            S 1 Reply Last reply Reply Quote 0
                            • S Do not disturb
                              sdetweil @airart
                              last edited by

                              @airart ctrl-c in ther terminal window will stop the active program

                              ignore warnings

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                matefits71
                                last edited by

                                Thanks for the tutorial, i’m running magicmirror on a surface pro 4,

                                The installation worked perfectly but when i tried to run npm start it throw an error “> DISPLAY=”${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js"

                                To bypass the error i edited the package.json by removing the DISPLAY="${DISPLAY:=:0} at the begining, tried npm start and it worked.

                                I’m not sure for what is that display option.

                                S 1 Reply Last reply Reply Quote 0
                                • S Do not disturb
                                  sdetweil @matefits71
                                  last edited by

                                  @matefits71 on Linux, the xwindows graphical system writes to a numbered ‘display’ , and there can be multiple.

                                  windows doesn’t have that. which is why I’ve written to remove that part, and also run the manual npm install in vendors and go ta folders

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  1 Reply Last reply Reply Quote 1
                                  • A Offline
                                    angeldchaveza
                                    last edited by

                                    $ npm start

                                    magicmirror@2.16.0 start C:\Users\Tecsis\MagicMirror
                                    DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

                                    “DISPLAY” no se reconoce como un comando interno o externo,
                                    programa o archivo por lotes ejecutable.
                                    npm ERR! code ELIFECYCLE
                                    npm ERR! errno 1
                                    npm ERR! magicmirror@2.16.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.16.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! C:\Users\Tecsis\AppData\Roaming\npm-cache_logs\2021-09-02T01_57_52_304Z-debug.log

                                    A 1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      angeldchaveza @angeldchaveza
                                      last edited by

                                      @angeldchaveza .
                                      im delete display of "matefits71 " error logs view

                                      0 info it worked if it ends with ok
                                      1 verbose cli [
                                      1 verbose cli ‘C:\Program Files\nodejs\node.exe’,
                                      1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
                                      1 verbose cli ‘start’
                                      1 verbose cli ]
                                      2 info using npm@6.14.14
                                      3 info using node@v14.17.5
                                      4 verbose stack Error: missing script: start
                                      4 verbose stack at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:155:19)
                                      4 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:63:5
                                      4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:116:5
                                      4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:436:5
                                      4 verbose stack at checkBinReferences_ (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:391:45)
                                      4 verbose stack at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:434:3)
                                      4 verbose stack at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:161:5)
                                      4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:382:12
                                      4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:123:16
                                      4 verbose stack at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:73:3)
                                      5 verbose cwd C:\Users\Tecsis\MagicMirror
                                      6 verbose Windows_NT 10.0.19041
                                      7 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “start”
                                      8 verbose node v14.17.5
                                      9 verbose npm v6.14.14
                                      10 error missing script: start
                                      11 verbose exit [ 1, true ]

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Do not disturb
                                        sdetweil @angeldchaveza
                                        last edited by sdetweil

                                        @angeldchaveza u are on windows. there are extra steps for windows.

                                        https://forum.magicmirror.builders/topic/4089/complete-walkthrough-install-magicmirror-on-a-pc-windows-7-10/141?page=15

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        A 1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          angeldchaveza @sdetweil
                                          last edited by

                                          @sdetweil said in Complete Walkthrough - Install MagicMirror on a PC - Windows 7/10:

                                          u are on windows. there are extra steps for windows

                                          these were the steps i followed

                                          https://forum.magicmirror.builders/topic/4089/complete-walkthrough-install-magicmirror-on-a-pc-windows-7-10

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Do not disturb
                                            sdetweil @angeldchaveza
                                            last edited by

                                            @angeldchaveza yes, but they changed.

                                            my link has the updated steps

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 13
                                            • 14
                                            • 15
                                            • 16
                                            • 17
                                            • 15 / 17
                                            • 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