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

Black Screen: "cannot find module 'node_helper'"

Scheduled Pinned Locked Moved Unsolved Troubleshooting
3 Posts 2 Posters 1.4k 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.
  • D Offline
    dankerthrone
    last edited by Nov 25, 2019, 5:57 PM

    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?

    S 1 Reply Last reply Nov 25, 2019, 6:01 PM Reply Quote 0
    • S Offline
      sdetweil @dankerthrone
      last edited by Nov 25, 2019, 6:01 PM

      @dankerthrone said in Black Screen: "cannot find module 'node_helper'":

      Cannot find module ‘node_helper’

      u did an npm install in a folder that had no package.json file I think

      workaround do

      cd ~/MagicMiror
      git checkout modules/node_modules/node_helper/index.js
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 2
      • D Offline
        dankerthrone
        last edited by dankerthrone Nov 25, 2019, 6:04 PM Nov 25, 2019, 6:03 PM

        So I feel slightly stupid, but for anyone in a similar situation, @sdetweil helped @JorickJuh in this thread with the same problem. I don’t know how to hotlink replies, so for anyone wondering, @sdetweil suggested that, as is evident from the log, node_helper is missing. So, for me, this did the trick:

        cd ~/MagicMirror
        git checkout modules/node_modules/node_helper/index.js
        

        EDIT: you beat me to it :D - thanks again!

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          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