MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. dankerthrone
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 14
    • Groups 0

    Posts

    Recent Best Controversial
    • Black Screen: "cannot find module 'node_helper'"

      Hey everyone,

      I did a fresh, clean install using the automated script and on first time startup, MM worked with the default modules. Then I tried adding MMM-DailyXKCD and on restarting, I found that something went wrong. I’m only presented with a fullscreen black window titled “electron”, but apart from that, nothing ever happens. This is the terminal output when launching from there:

      pi@raspberrypi:~/MagicMirror $ DISPLAY=:0 npm start
      
      > magicmirror@2.9.0 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.9.0
      Loading config ...
      Loading module helpers ...
      WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'node_helper'
      Loading module helpers ...
      App threw an error during load
      Error: Cannot find module 'node_helper'
          at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
          at Function.Module._load (internal/modules/cjs/loader.js:528:25)
          at Module.require (internal/modules/cjs/loader.js:658:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/DailyXKCD/node_helper.js:2:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/DailyXKCD/node_helper.js:50:3)
          at Module._compile (internal/modules/cjs/loader.js:711:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
          at Module.load (internal/modules/cjs/loader.js:620:32)
      Whoops! There was an uncaught exception...
      { Error: Cannot find module 'node_helper'
          at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
          at Function.Module._load (internal/modules/cjs/loader.js:528:25)
          at Module.require (internal/modules/cjs/loader.js:658:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/DailyXKCD/node_helper.js:2:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/DailyXKCD/node_helper.js:50:3)
          at Module._compile (internal/modules/cjs/loader.js:711:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
          at Module.load (internal/modules/cjs/loader.js:620:32) code: 'MODULE_NOT_FOUND' }
      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.
      
      

      Any ideas as to what’s happening here?

      posted in Troubleshooting
      D
      dankerthrone
    • RE: MMM-Sunrise-Sunset

      That seems to have been a copy/paste-error. My terminal history shows it with the underscore. To make sure, I tried it once again, but still get

      pi@raspberrypi:~/MagicMirror/modules/MMM-Sunrise-Sunset $ cp node_modules/jquery/dist/jquery.js .
      cp: cannot stat 'node_modules/jquery/dist/jquery.js': No such file or directory
      
      posted in Utilities
      D
      dankerthrone
    • RE: MMM-Sunrise-Sunset

      @sdetweil: Thank you so much for your help here. I’m having the exact same problem as @pugsly did, but unfortunately your suggestions seem to not do the trick. I was wondering if you could help me out, too. So far I got:

                              {
      			module: "MMM-Sunrise-Sunset",
      			position: "bottom_bar",
      			config: {
      				apiKey: "xxx", 				
      				latitude: "xx.03586",
      				longitude: "xx.06379",
      				timezone: "Europe/Berlin",
      				layout: "inline"
      				}
      		},
      

      My screen stays black, though, and the developer console is giving me this:

      Uncaught ReferenceError: $ is not defined
      at Class.updateSun (MMM-Sunrise-Sunset.js:33)
      at Class.start (MMM-Sunrise-Sunset.js:12)
      at startModules (loader.js:55)
      at loader.js:40
      at HTMLLinkElement.stylesheet.onload (loader.js:200)
      

      I even tried executing your suggestions as root, thinking that I must’ve done something wrong, but I got the same error messages as before:

      root@raspberrypi:/home/pi/MagicMirror/modules/MMM-Sunrise-Sunset# npm install jquery
      npm WARN saveError ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json'
      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.
      
      + jquery@3.4.1
      removed 1 package, updated 1 package and audited 1 package in 4.09s
      found 0 vulnerabilities
      
      root@raspberrypi:/home/pi/MagicMirror/modules/MMM-Sunrise-Sunset# cp node/modules/jquery/dist/jquery.js .
      cp: cannot stat 'node/modules/jquery/dist/jquery.js': No such file or directory
      

      What am I missing here?

      posted in Utilities
      D
      dankerthrone
    • RE: mmm-suncalc - Text only display of sunrise, sunset and other sun events

      Hey, total newbie to everything coding- and mirror-related here. I tried to get suncalc to work while also trying @retroflex 's suggested layout, but whatever I do, nothing ever show’s up on my MM screen. The module just doesn’t do anything. Do I need to also clone the original suncalc repository? Where to, if so?

      So far, what I got is this:

      {
      			module: 'mmm-suncalc',
      			position: "lower_third",
      			//classes: "default everyone small dimmed",
      			header: "Sonne",
      			config: {
      				latitude: 51.03586,
      				longitude: 7.06379,
      				text: "Aufgang: <dawn> - <sunrise>. Untergang: <sunset> - <dusk>"
      				//'<table>' + 
      				//'<tr><td>&#9728;</td><td>Går upp:</td><td><dawn> - <sunrise></td></tr>' +
      				//'<tr><td>&#9790;</td><td>Går ner:</td><td><sunset> - <dusk></td></tr>' +
      				//'</table>'
      				},
      		},
      

      Does that look alright?

      posted in Utilities
      D
      dankerthrone
    • 1
    • 2
    • 2 / 2