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.

    Problems with Config.js on Pi4 BlackScreen

    Scheduled Pinned Locked Moved Solved Troubleshooting
    24 Posts 2 Posters 8.3k 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.
    • D Offline
      dazza120 @sdetweil
      last edited by

      @sdetweil its in that path already but it is completely empty. should it contain text?

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

        @dazza120 sorry, what is “it’s”?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          dazza120 @sdetweil
          last edited by dazza120

          @sdetweil /home/pi/MagicMirror The mm.sh should it contain text?

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

            @dazza120 sorry… what is completely empty? mm.sh is in installers folder

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            D 1 Reply Last reply Reply Quote 0
            • D Offline
              dazza120 @sdetweil
              last edited by

              @sdetweil i unhide my files and one is in the location i said with no text and the other is in installer as you said with text

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

                @dazza120 remove the one in MagicMirror… useless

                Fix the one in installers

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                D 1 Reply Last reply Reply Quote 0
                • D Offline
                  dazza120 @sdetweil
                  last edited by

                  @sdetweil ok done, what to do now. ive just copied the installer one and overwrite the magic mirror path one

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

                    @dazza120 which one does pm2 want to use? I am not near my computer so can’t get the list of pm2 commands.

                    pm2 – help

                    Did u edit the path in mm.sh?

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    D 1 Reply Last reply Reply Quote 0
                    • D Offline
                      dazza120 @sdetweil
                      last edited by dazza120

                      @sdetweil no i mearly placed it in the magicmirror folder path. its set to Cd /MagicMirror folder already and pm2 -help isnt displaying a list of pm2 commands

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

                        @dazza120 inside needs to be

                        cd /home/pi/MagicMirror
                        DISPLAY=:0 npm start
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        D 1 Reply Last reply Reply Quote 0
                        • D Offline
                          dazza120 @sdetweil
                          last edited by

                          @sdetweil changed it what now mate

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

                            @dazza120 did u try pm2 now?

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            D 1 Reply Last reply Reply Quote 0
                            • D Offline
                              dazza120 @sdetweil
                              last edited by

                              @sdetweil pm2 start or the dev thing?

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

                                @dazza120

                                Let’s get npm start dev working

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                D 1 Reply Last reply Reply Quote 0
                                • D Offline
                                  dazza120 @sdetweil
                                  last edited by dazza120

                                  @sdetweil still nothing in the dev console mate, i can start the whole build over again but everytime i go to change the config it doesnt work

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

                                    @dazza120 ok, start again… change the config?

                                    So, you install a module. If it has package.json file you run npm install in the module folder

                                    Then edit config.js and add
                                    Module structure.

                                    {
                                      module:'somename',
                                      config: {
                                      }
                                    },
                                    

                                    To the modules array.

                                    If think syntax error, from the MagicMirror folder do,

                                    npm  run config:check
                                    

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    D 2 Replies Last reply Reply Quote 0
                                    • D Offline
                                      dazza120 @sdetweil
                                      last edited by

                                      @sdetweil yep im cd-ing into the module folder and then running npm install, ill start over again and go through it slowly but ive probably built the mirror 20 from scratch no issues before with config but ive altered it too much now thinking that was it so its from scratch now but copying back the old config should have sorted any of those issues, does your installer work?

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        dazza120 @sdetweil
                                        last edited by dazza120

                                        @sdetweil I think i found the problem mmm-nest-status install messes up the MM install, i think other are having simular things with other modules. i installed MMM-SystemStats changed the config file tested it and it was working find, i installed mmm-nest-status and didn’t alter the config for that so that should have just ment it wouldn’t run that module. i have attached the code below does this shead any light?

                                        pi@raspberrypi:~ $ cd MagicMirror/modules
                                        pi@raspberrypi:~/MagicMirror/modules $ git clone https://github.com/BenRoe/MMM-SystemStats
                                        Cloning into 'MMM-SystemStats'...
                                        remote: Enumerating objects: 22, done.
                                        remote: Counting objects: 100% (22/22), done.
                                        remote: Compressing objects: 100% (14/14), done.
                                        remote: Total 231 (delta 10), reused 16 (delta 8), pack-reused 209
                                        Receiving objects: 100% (231/231), 88.08 KiB | 578.00 KiB/s, done.
                                        Resolving deltas: 100% (122/122), done.
                                        pi@raspberrypi:~/MagicMirror/modules $ cd MMM-SystemStats
                                        pi@raspberrypi:~/MagicMirror/modules/MMM-SystemStats $ npm install
                                        npm notice created a lockfile as package-lock.json. You should commit this file.
                                        added 1 package from 1 contributor and audited 1 package in 1.265s
                                        found 0 vulnerabilities
                                        
                                        pi@raspberrypi:~/MagicMirror/modules/MMM-SystemStats $ cd
                                        pi@raspberrypi:~ $ cd MagicMirror
                                        pi@raspberrypi:~/MagicMirror $ npm  run config:check
                                        
                                        > magicmirror@2.8.0 config:check /home/pi/MagicMirror
                                        > node tests/configs/check_config.js
                                        
                                        Checking file...  /home/pi/MagicMirror/config/config.js
                                        Your configuration file doesn't contain syntax errors :)
                                        pi@raspberrypi:~/MagicMirror $ cd modules
                                        pi@raspberrypi:~/MagicMirror/modules $ git clone https://github.com/michael5r/mmm-nest-status.git
                                        Cloning into 'mmm-nest-status'...
                                        remote: Enumerating objects: 135, done.
                                        remote: Total 135 (delta 0), reused 0 (delta 0), pack-reused 135
                                        Receiving objects: 100% (135/135), 65.27 KiB | 718.00 KiB/s, done.
                                        Resolving deltas: 100% (77/77), done.
                                        pi@raspberrypi:~/MagicMirror/modules $ cd mmm-nest-status
                                        pi@raspberrypi:~/MagicMirror/modules/mmm-nest-status $ npm install
                                        npm WARN deprecated undefined@0.1.0: this package has been deprecated
                                        npm WARN saveError ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json'
                                        npm notice created a lockfile as package-lock.json. You should commit this file.
                                        npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json'
                                        npm WARN modules No description
                                        npm WARN modules No repository field.
                                        npm WARN modules No README data
                                        npm WARN modules No license field.
                                        
                                        removed 1 package in 1.141s
                                        found 0 vulnerabilities
                                        
                                        pi@raspberrypi:~/MagicMirror/modules/mmm-nest-status $ cd
                                        pi@raspberrypi:~ $ pm2 restart MagicMirror
                                        Use --update-env to update environment variables
                                        [PM2] Applying action restartProcessId on app [MagicMirror](ids: 0)
                                        [PM2] [MagicMirror](0) ✓
                                        ┌─────────────┬────┬──────┬────────┬───┬─────┬──────────┐
                                        │ Name        │ id │ mode │ status │ ↺ │ cpu │ memory   │
                                        ├─────────────┼────┼──────┼────────┼───┼─────┼──────────┤
                                        │ MagicMirror │ 0  │ fork │ online │ 2 │ 0%  │ 2.5 MB   │
                                        └─────────────┴────┴──────┴────────┴───┴─────┴──────────┘
                                         Use `pm2 show <id|name>` to get more details about an app
                                        pi@raspberrypi:~ $ npm  run config:check
                                        npm ERR! path /home/pi/package.json
                                        npm ERR! code ENOENT
                                        npm ERR! errno -2
                                        npm ERR! syscall open
                                        npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
                                        npm ERR! enoent This is related to npm not being able to find a file.
                                        npm ERR! enoent 
                                        
                                        npm ERR! A complete log of this run can be found in:
                                        npm ERR!     /home/pi/.npm/_logs/2019-07-13T20_08_21_703Z-debug.log
                                        pi@raspberrypi:~ $ 
                                        
                                        

                                        Complete log from .npm folder

                                        0 info it worked if it ends with ok
                                        1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'config:check' ]
                                        2 info using npm@6.10.1
                                        3 info using node@v10.15.2
                                        4 verbose config Skipping project config: /home/pi/.npmrc. (matches userconfig)
                                        5 verbose stack Error: ENOENT: no such file or directory, open '/home/pi/package.json'
                                        6 verbose cwd /home/pi
                                        7 verbose Linux 4.19.57-v7l+
                                        8 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "config:check"
                                        9 verbose node v10.15.2
                                        10 verbose npm  v6.10.1
                                        11 error path /home/pi/package.json
                                        12 error code ENOENT
                                        13 error errno -2
                                        14 error syscall open
                                        15 error enoent ENOENT: no such file or directory, open '/home/pi/package.json'
                                        16 error enoent This is related to npm not being able to find a file.
                                        17 verbose exit [ -2, true ]
                                        
                                        
                                        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
                                        • 1 / 2
                                        • 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