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

Cannot find module 'module-alias/register'

Scheduled Pinned Locked Moved Solved Troubleshooting
10 Posts 3 Posters 6.3k Views 3 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
    DerRheingold
    last edited by Jan 2, 2020, 3:46 PM

    Hi,

    since two days now, I keep getting this error-message when (re)starting MagicMirror:

    App threw an error during load
    Error: Cannot find module 'module-alias/register'
        at Module._resolveFilename (module.js:455: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 (module.js:403:25)
        at Module.require (module.js:483:17)
        at require (internal/module.js:20:19)
        at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:15:1)
        at Module._compile (module.js:556:32)
        at Object.Module._extensions..js (module.js:565:10)
        at Module.load (module.js:473:32)
        at tryModuleLoad (module.js:432:12)
    A JavaScript error occurred in the main process
    Uncaught Exception:
    Error: Cannot find module 'module-alias/register'
        at Module._resolveFilename (module.js:455: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 (module.js:403:25)
        at Module.require (module.js:483:17)
        at require (internal/module.js:20:19)
        at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:15:1)
        at Module._compile (module.js:556:32)
        at Object.Module._extensions..js (module.js:565:10)
        at Module.load (module.js:473:32)
        at tryModuleLoad (module.js:432:12)
    
    

    On a regular base I make a git fetch etc. to make sure MagicMirror is up to date. This morning somehow it wouldn’t start anymore. That’s the error I get when manually starting via

    cd ~/MagicMirror
    DISPLAY=:0 npm start
    

    Any idea how to fix this? … and even more: any idea what might have caused this?

    Cheers :)

    S 1 Reply Last reply Jan 2, 2020, 3:48 PM Reply Quote 0
    • S Offline
      sdetweil @DerRheingold
      last edited by Jan 2, 2020, 3:48 PM

      @DerRheingold did u try to update to the latest release?

      if so, there were two steps

      git pull
      npm install
      did u do the second?

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • D Offline
        DerRheingold
        last edited by Jan 5, 2020, 5:02 PM

        @sdetweil said in Cannot find module 'module-alias/register':

        npm install

        Thanks, yes that was very helpful. Helped indeed. However I also had to fix one module by deleting and pulling it again, but now it works fine. Thanks once more :)

        1 Reply Last reply Reply Quote 0
        • A Offline
          amanzimdwini
          last edited by Mar 23, 2020, 4:06 PM

          Hmm - same thing for me. Too much time on my hands, so I updated. And now I get

          A JavaScript error occurred in the main process
          Uncaught Exception:
          Error: Cannot find module 'module-alias/register'
              at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
              at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/elect                                                                                                                                                             ron/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/js/app.js:15:1)
              at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:283: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)
          
          

          help?

          Thanks,
          Karl

          S 1 Reply Last reply Mar 23, 2020, 4:26 PM Reply Quote 0
          • S Offline
            sdetweil @amanzimdwini
            last edited by Mar 23, 2020, 4:26 PM

            @amanzimdwini and u also did

            npm install
            

            after the git pull…

            need everyone to start using the update script…
            from here
            https://github.com/sdetweil/MagicMirror_scripts

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            A 1 Reply Last reply Mar 23, 2020, 4:41 PM Reply Quote 0
            • A Offline
              amanzimdwini @sdetweil
              last edited by Mar 23, 2020, 4:41 PM

              @sdetweil
              I did (read my way through all the posts)

              HOWEVER,
              https://forum.magicmirror.builders/topic/10859/new-update-upgrade-script-ready-for-testing/2
              told me to run

              bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)"
              

              and that made me a new installation that did work.

              Sometimes you have to sledgehammer things, I guess.

              Thanks for offering to help,
              karl

              S 1 Reply Last reply Mar 23, 2020, 4:45 PM Reply Quote 0
              • S Offline
                sdetweil @amanzimdwini
                last edited by sdetweil Mar 24, 2020, 3:08 AM Mar 23, 2020, 4:45 PM

                @amanzimdwini that post says

                I also have a newer installer that resolves a lot of problems with MM

                post 1
                says

                given that we will have a regular update quarterly, and we have such a large number of new users experiencing troubles after updates (mostly cause they have a ton to learn)… I have developed a script I would like to get included for future updates…

                but glad u got it working… many cannot just reinstall easily

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                A 1 Reply Last reply Mar 23, 2020, 4:48 PM Reply Quote 0
                • A Offline
                  amanzimdwini @sdetweil
                  last edited by Mar 23, 2020, 4:48 PM

                  @sdetweil
                  wait - wasnt’ that the newest?
                  Sorry - working on something else right now, but please send latest and best installer link

                  THANKS FOR THE HELP,
                  Karl

                  S 1 Reply Last reply Mar 23, 2020, 4:50 PM Reply Quote 0
                  • S Offline
                    sdetweil @amanzimdwini
                    last edited by Mar 23, 2020, 4:50 PM

                    @amanzimdwini

                    please read the page here for the multiple scripts I provide

                    https://github.com/sdetweil/MagicMirror_scripts

                    each provides the string to cut/paste to execute the specific function
                    install,
                    update
                    screen saver
                    pm2

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    A 1 Reply Last reply Mar 23, 2020, 4:55 PM Reply Quote 0
                    • A Offline
                      amanzimdwini @sdetweil
                      last edited by Mar 23, 2020, 4:55 PM

                      @sdetweil THX! Will do.

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