MagicMirror² v2.5.0 is available! For more information about this release, check out this topic.

Error: Module version mismatch. Expected 50, got 54



  • Hi,
    I have just updated updated my MagicMirror installation to the current 2.2.0 but now I only get a blank screen.

    npm start
    

    shows the following output.

    pi@raspberrypi:~/MagicMirror $ npm start
    
    > magicmirror@2.2.2 start /home/pi/MagicMirror
    > sh run-start.sh
    
    Starting MagicMirror: v2.2.2
    Loading config ...
    Loading module helpers ...
    WARNING! Could not load config file. Starting with default configuration. Error found: Error: Module version mismatch. Expected 50, got 54.
    Loading module helpers ...
    App threw an error during load
    Error: Module version mismatch. Expected 50, got 54.
        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-PIR-Sensor/node_modules/bindings/bindings.js:81:44)
    Whoops! There was an uncaught exception...
    Error: Module version mismatch. Expected 50, got 54.
        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-PIR-Sensor/node_modules/bindings/bindings.js:81: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.
    ^CShutting down server...
    
    
    

    I don’t really know what that version mismatch means. I haven’t changed anything else to my set-up but just updated from the previous release to the current one. Any help before I wipe everything and start all over new?



  • I had this and managed to correct it by following the steps listed here at the end of the readme. Worked for me but not sure if it’ll work for you so i’d recommend backing up first.

    https://github.com/ryck/MMM-DHT-Sensor

    cd MMM-DHT-Sensor
    npm install electron-rebuild
    ./node_modules/.bin/electron-rebuild
    

    But substituting MMM-DHT-Sensor for your module above ‘MMM-PIR-Sensor’



  • Thanks for the very quick reply. I am currently backing up my MM install and give it a try.

    Edit: For a test I just did a

    npm install
    

    and checked if the mirror starts up. Which it did. Thanks so much for your help!



  • npm install worked for me as well, somehow npm rebuild didnt do this job.