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

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

Scheduled Pinned Locked Moved Troubleshooting
17 Posts 4 Posters 950 Views 4 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
    Stef
    last edited by Aug 2, 2020, 4:02 PM

    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 Aug 2, 2020, 4:14 PM Reply Quote 0
    • S Offline
      sdetweil @Stef
      last edited by Aug 2, 2020, 4:14 PM

      @Stef do

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

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Aug 4, 2020, 12:39 PM Reply Quote 1
      • S Offline
        Stef @sdetweil
        last edited by Aug 4, 2020, 12:39 PM

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

        S 2 Replies Last reply Aug 4, 2020, 12:59 PM Reply Quote 0
        • S Offline
          sdetweil @Stef
          last edited by Aug 4, 2020, 12:59 PM

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

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 1
          • S Offline
            sdetweil @Stef
            last edited by sdetweil Aug 4, 2020, 1:13 PM Aug 4, 2020, 1:12 PM

            @Stef ok, let’s try this

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

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User
              last edited by Aug 4, 2020, 1:18 PM

              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 Offline
                Stef
                last edited by Aug 4, 2020, 9:01 PM

                @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 Aug 4, 2020, 9:03 PM Reply Quote 0
                • S Offline
                  sdetweil @Stef
                  last edited by sdetweil Aug 4, 2020, 9:05 PM Aug 4, 2020, 9:03 PM

                  @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

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    Stef
                    last edited by Aug 4, 2020, 9:17 PM

                    @sdetweil
                    ok…

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

                    S 1 Reply Last reply Aug 4, 2020, 9:54 PM Reply Quote 0
                    • S Offline
                      sdetweil @Stef
                      last edited by sdetweil Aug 4, 2020, 9:54 PM Aug 4, 2020, 9:54 PM

                      @Stef fun

                      another try
                      from the module folder

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

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      S 1 Reply Last reply Aug 6, 2020, 9:08 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        1/17
                        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