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

MMM-Button doesn't work

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 2 Posters 6.8k 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.
  • C Offline
    Codejune
    last edited by Nov 27, 2016, 10:11 AM

    Good morning.
    This time I’m adding a push button to my MagicMirror project.
    So, after searching, there was a module called MMM-Button.
    I cloned the module in ~ / MagicMirror / modules folder and added the module to the config file. However, when the npm start command is input to the terminal, the following error is displayed and only the white screen is output to the monitor.

    My npm version is 3.10.8.

    I also run

    npm install --save - dev electron - rebuild

    command, and

    rm - rf node_modules && npm install

    However, the error was not resolved.

    In addition to the above, I also tried

    npm rebuild --runtime = electron --target = 1.3.4 - disturl = https: //atom.io/download/atom-shell --abi = 50

    in the terminal. also tried to run

    npm rebuild --runtime = electron --target = 1.4.0 --disturl = https: //atom.io/download/atom-shell --build-from-source

    command but the problem is Expected 50, got In 48th, it was changed to Expected 50, got 49.

    =======================================================================
    pi@raspberrypi:~/MagicMirror $ npm start

    magicmirror@2.0.0 start /home/pi/MagicMirror
    electron js/electron.js

    Loading config …
    Loading module helpers …
    No helper found for module: alert.
    No helper found for module: clock.
    Initializing new module helper …
    No helper found for module: compliments.
    No helper found for module: currentweather.
    No helper found for module: weatherforecast.
    Initializing new module helper …
    Initializing new module helper …
    WARNING! Could not load config file. Starting with default configuration. Error found: Error: Module version mismatch. Expected 50, got 49.
    Loading module helpers …
    No helper found for module: alert.
    No helper found for module: clock.
    Initializing new module helper …
    No helper found for module: compliments.
    No helper found for module: currentweather.
    No helper found for module: weatherforecast.
    Initializing new module helper …
    Initializing new module helper …
    App threw an error during load
    Error: Module version mismatch. Expected 50, got 49.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions…node (module.js:583:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at bindings (/home/pi/MagicMirror/modules/MMM-Button/node_modules/bindings/bindings.js:76:44)
    Whoops! There was an uncaught exception…
    Error: Module version mismatch. Expected 50, got 49.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions…node (module.js:583:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at bindings (/home/pi/MagicMirror/modules/MMM-Button/node_modules/bindings/bindings.js:76:44)
    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    Launching application.

    1 Reply Last reply Reply Quote 0
    • L Offline
      lolobyte
      last edited by Nov 27, 2016, 10:19 AM

      hi,

      see here…

      https://forum.magicmirror.builders/topic/948/error-found-error-module-version-mismatch-expected-50-got-46/7

      1 Reply Last reply Reply Quote 0
      • C Offline
        Codejune
        last edited by Codejune Nov 27, 2016, 10:29 AM Nov 27, 2016, 10:29 AM

        I have already run npm rebuild --runtime = electron --target = 1.4.5 --disturl = https: //atom.io/download/atom-shell --abi = 50, but Expected 50, got 49. The error is still output.

        1 Reply Last reply Reply Quote 0
        • L Offline
          lolobyte
          last edited by Nov 27, 2016, 10:36 AM

          at first u must check witch version u have.

          Error was in my electron:
          Error: Module version mismatch. Expected 50, got 51.

          Stat your shell an type following command in your MagicMirror folder: npm list | grep electron

          At result you must see something like this…

          pi@raspberrypi:~/MagicMirror $ npm list | grep electron
          ├─┬ electron-prebuilt@1.4.6
          │ ├─┬ electron-download@3.0.1
          npm ERR! extraneous: stylelint@7.5.0 /home/pi/MagicMirror/node_modules/stylelint

          What must be done here?
          at first change in your Button folder:

          cd ~/MagicMirror/modules/MMM-Button

          and then type in following command, you must change the version number with your own:

          npm rebuild --runtime=electron --target=1.4.6 --disturl=https://atom.io/download/atom-shell --abi=50

          That’s all.

          1 Reply Last reply Reply Quote 0
          • C Offline
            Codejune
            last edited by Codejune Nov 27, 2016, 11:05 AM Nov 27, 2016, 11:04 AM

            I have run the command in the project folder and have not run it from the module folder. So I guess it was not solved yet.
            This solves the problem. Thank you!

            1 Reply Last reply Reply Quote 0
            • L Offline
              lolobyte
              last edited by Nov 27, 2016, 11:18 AM

              you’re welcome.

              Have fun with your Mirror.

              Does the button work now with MMM-podcast?

              1 Reply Last reply Reply Quote 0
              • C Offline
                Codejune
                last edited by Codejune Nov 27, 2016, 11:59 AM Nov 27, 2016, 11:51 AM

                MMM-Podcast seems to be working correctly.

                L 1 Reply Last reply Nov 27, 2016, 12:17 PM Reply Quote 0
                • L Offline
                  lolobyte @Codejune
                  last edited by Nov 27, 2016, 12:17 PM

                  @Codejune

                  nice, with gpio 5 and GND?

                  C 1 Reply Last reply Nov 27, 2016, 12:26 PM Reply Quote 0
                  • C Offline
                    Codejune @lolobyte
                    last edited by Nov 27, 2016, 12:26 PM

                    @lolobyte Sure. By default, I put a Push Button on pin 5 and connected it to GND. As a result, I was able to see that it worked successfully.

                    Like this Image -> https://github.com/Codejune/WebImageStorage/blob/master/Result.jpg?raw=true

                    L 1 Reply Last reply Nov 27, 2016, 12:29 PM Reply Quote 0
                    • L Offline
                      lolobyte @Codejune
                      last edited by Nov 27, 2016, 12:29 PM

                      @Codejune

                      are u in a club or a hw do it yourself organisation?

                      C 1 Reply Last reply Nov 27, 2016, 12:36 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        1/11
                        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