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

Problems with Config.js on Pi4 BlackScreen

Scheduled Pinned Locked Moved Solved Troubleshooting
24 Posts 2 Posters 6.0k 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.
  • S Offline
    sdetweil @dazza120
    last edited by Jul 13, 2019, 6:01 PM

    @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 Jul 13, 2019, 6:06 PM Reply Quote 0
    • D Offline
      dazza120 @sdetweil
      last edited by Jul 13, 2019, 6:06 PM

      @sdetweil pm2 start or the dev thing?

      S 1 Reply Last reply Jul 13, 2019, 6:07 PM Reply Quote 0
      • S Offline
        sdetweil @dazza120
        last edited by Jul 13, 2019, 6:07 PM

        @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 Jul 13, 2019, 6:13 PM Reply Quote 0
        • D Offline
          dazza120 @sdetweil
          last edited by dazza120 Jul 13, 2019, 6:16 PM Jul 13, 2019, 6:13 PM

          @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 Jul 13, 2019, 6:34 PM Reply Quote 0
          • S Offline
            sdetweil @dazza120
            last edited by Jul 13, 2019, 6:34 PM

            @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 Jul 13, 2019, 6:56 PM Reply Quote 0
            • D Offline
              dazza120 @sdetweil
              last edited by Jul 13, 2019, 6:56 PM

              @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 Jul 13, 2019, 9:24 PM Jul 13, 2019, 8:19 PM

                @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
                • 1
                • 2
                • 3
                • 3 / 3
                3 / 3
                • First post
                  22/24
                  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