MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    MagicMirror² v2.12.0 & MMM-DHT-Sensor (temperatur & humidity)

    Troubleshooting
    4
    17
    363
    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
      Stef last edited by

      Hi there,

      after updating my Magic Mirror to the latest version, the Modul “MMM-DHT-Sensor” won’t work anymore.
      In fact, the MagicMirror “crashes” with a black screen while loading it:

      [2020-08-02 17:45:35.380] [ERROR]  App threw an error during load
      [2020-08-02 17:45:35.384] [ERROR]  Error: The module '/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor/build/Release/node_dht_sensor.node'
      was compiled against a different Node.js version using
      NODE_MODULE_VERSION 64. This version of Node.js requires
      NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
      the module (for instance, using `npm rebuild` or `npm install`).
          at process.func (electron/js2c/asar.js:138:31)
          at process.func [as dlopen] (electron/js2c/asar.js:138:31)
          at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18)
          at Object.func (electron/js2c/asar.js:138:31)
          at Object.func [as .node] (electron/js2c/asar.js:138:31)
          at Module.load (internal/modules/cjs/loader.js:645:32)
          at Function.Module._load (internal/modules/cjs/loader.js:560:12)
          at Module.require (internal/modules/cjs/loader.js:685:19)
          at require (internal/modules/cjs/helpers.js:16:16)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_helper.js:11:16)
      [2020-08-02 17:45:35.394] [ERROR]  Whoops! There was an uncaught exception...
      [2020-08-02 17:45:35.397] [ERROR]  Error: The module '/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor/build/Release/node_dht_sensor.node'
      was compiled against a different Node.js version using
      NODE_MODULE_VERSION 64. This version of Node.js requires
      NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
      the module (for instance, using `npm rebuild` or `npm install`).
          at process.func (electron/js2c/asar.js:138:31)
          at process.func [as dlopen] (electron/js2c/asar.js:138:31)
          at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18)
          at Object.func (electron/js2c/asar.js:138:31)
          at Object.func [as .node] (electron/js2c/asar.js:138:31)
          at Module.load (internal/modules/cjs/loader.js:645:32)
          at Function.Module._load (internal/modules/cjs/loader.js:560:12)
          at Module.require (internal/modules/cjs/loader.js:685:19)
          at require (internal/modules/cjs/helpers.js:16:16)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_helper.js:11:16)
      [2020-08-02 17:45:35.414] [ERROR]  MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [2020-08-02 17:45:35.415] [ERROR]  If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank"
      [2020-08-02 17:45:35.722] [LOG]    Launching application.
      

      I already tried a

      npm rebuild
      npm install
      

      with no luck…

      Right now, i am dumping my Mirror with dd to my NAS - maybe someone here can has experienced this error as well, or is using another Module, which he/she could recommend.

      thank you all

      stefan

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @Stef last edited by

        @Stef do

        cd ~/MagicMirror
        npm install electron-rebuild --save
        node node_modules/.bin/electron-rebuild
        

        Sam

        Create a working config
        How to add modules

        S 1 Reply Last reply Reply Quote 1
        • S
          Stef @sdetweil last edited by

          @sdetweil
          Remembered that
          Did that
          Did not work
          Still the same error message…

          S 2 Replies Last reply Reply Quote 0
          • S
            sdetweil @Stef last edited by

            @Stef asked friend to look at this too. we have been discussing right way to fix. so hang on

            Sam

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 1
            • S
              sdetweil @Stef last edited by sdetweil

              @Stef ok, let’s try this

              cd~/MagicMirror/modules
              cd MMM-DHT-Sensor
              npm i electron-rebuild
              node node_modules/.bin/electron-rebuild
              

              Sam

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User last edited by

                note:
                Don’t do npm fix npm audit fix npm rebuild or other command like @sdetweil says
                otherwise you will have the same error !

                1 Reply Last reply Reply Quote 0
                • S
                  Stef last edited by

                  @sdetweil thanks a million for your effort… unfortunatley, the last command gives me back a bunch of errors… even with sudo…

                  i ran it for a third time and got this:

                  pi@mirrorpi:~/MagicMirror/modules/MMM-DHT-Sensor $ node node_modules/.bin/electron-rebuild
                  ✖ Rebuild Failed
                  
                  An unhandled error occurred inside electron-rebuild
                  gyp info it worked if it ends with ok
                  gyp info using node-gyp@6.1.0
                  gyp info using node@12.14.0 | linux | arm
                  gyp ERR! clean error 
                  gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile'
                  gyp ERR! System Linux 4.19.66-v7+
                  gyp ERR! command "/usr/local/bin/node" "/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source"
                  gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor
                  gyp ERR! node -v v12.14.0
                  gyp ERR! node-gyp -v v6.1.0
                  gyp ERR! not ok 
                  
                  Failed with exit code: 1
                  
                  Error: gyp info it worked if it ends with ok
                  gyp info using node-gyp@6.1.0
                  gyp info using node@12.14.0 | linux | arm
                  gyp ERR! clean error 
                  gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile'
                  gyp ERR! System Linux 4.19.66-v7+
                  gyp ERR! command "/usr/local/bin/node" "/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source"
                  gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor
                  gyp ERR! node -v v12.14.0
                  gyp ERR! node-gyp -v v6.1.0
                  gyp ERR! not ok 
                  
                  Failed with exit code: 1
                      at SafeSubscriber._error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/spawn-rx/lib/src/index.js:267:84)
                      at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:205:16)
                      at SafeSubscriber.error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:156:26)
                      at Subscriber._error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:92:26)
                      at Subscriber.error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:72:18)
                      at MapSubscriber.Subscriber._error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:92:26)
                      at MapSubscriber.Subscriber.error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:72:18)
                      at SafeSubscriber._next (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/spawn-rx/lib/src/index.js:242:65)
                      at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:205:16)
                      at SafeSubscriber.next (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:143:22)
                  
                  

                  @Bugsounet which command should i run?

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    sdetweil @Stef last edited by sdetweil

                    @Stef cause I used sudo, some stuff is now connected to root user
                    from the module folder
                    do

                    sudo chown -R pi *
                    sudo chown -R pi *.*
                    

                    and rerun the electron rebuild
                    show us the errors

                    Sam

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 0
                    • S
                      Stef last edited by

                      @sdetweil
                      ok…

                      since the post would be to long, you will find it here

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        sdetweil @Stef last edited by sdetweil

                        @Stef fun

                        another try
                        from the module folder

                        rm -rf node_modules
                        rm package-lock.json
                        npm install nan
                        npm install
                        

                        Sam

                        Create a working config
                        How to add modules

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy