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
    3 Posts 2 Posters 730 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.
    • N Offline
      NoRoots
      last edited by

      Hey Guys!

      I want to run MagicMirror headless on a Raspberry Pi 4, running Raspian Lite, and show the actual Content on a spare iPad.

      I followed the Setup tutorial but now i´m stuck with this message:

      pi@raspberrypi:~/MagicMirror $ npm run server
      
      > magicmirror@2.19.0 server
      > node ./serveronly
      
      node:internal/modules/cjs/loader:936
        throw err;
        ^
      
      Error: Cannot find module 'module-alias/register'
      Require stack:
      - /home/pi/MagicMirror/js/app.js
      - /home/pi/MagicMirror/serveronly/index.js
          at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
          at Function.Module._load (node:internal/modules/cjs/loader:778:27)
          at Module.require (node:internal/modules/cjs/loader:1005:19)
          at require (node:internal/modules/cjs/helpers:102:18)
          at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:9:1)
          at Module._compile (node:internal/modules/cjs/loader:1103:14)
          at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
          at Module.load (node:internal/modules/cjs/loader:981:32)
          at Function.Module._load (node:internal/modules/cjs/loader:822:12)
          at Module.require (node:internal/modules/cjs/loader:1005:19) {
        code: 'MODULE_NOT_FOUND',
        requireStack: [
          '/home/pi/MagicMirror/js/app.js',
          '/home/pi/MagicMirror/serveronly/index.js'
        ]
      }
      
      

      The Config file is pretty vanilla, these are the changes i made to access MM from a Browser.

      let config = {
              address: "0.0.0.0",     // Address to listen on, can be:
                                                              // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                                                              // - another specific IPv4/6 to listen on a specific interface
                                                              // - "0.0.0.0", "::" to listen on any interface
                                                              // Default, when address config is left out or empty, is "localhost"
              port: 8081,
              basePath: "/",  // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
                                              // you must set the sub path here. basePath must end with a /
              ipWhitelist: [],
      

      What am i missing here? There are some threads regarding this error, but all of them are about an incomplete update, missing the “npm install” part. since this is a fresh setup and i did the install part, i can rule that one out.

      Thanks for your Help!
      BR

      S 1 Reply Last reply Reply Quote 0
      • N Offline
        NoRoots @sdetweil
        last edited by

        @sdetweil
        yes, i did the npm install after git clone.
        I tried both versions:

        npm install --only=prod --omit=dev //as seen in the tutorial
        npm install // as seen in the forum
        

        damnit…
        i just did npm install again, and now it works.
        Thanks!

        The iPad is an Gen. 8 with the latest iOS. it works just fine!

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

          @NoRoots did u do the npm install ? after git clone?

          probably can’t use older ipad.

          it doesn’t support the latest JavaScript idioms the mm code uses. es6…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          N 1 Reply Last reply Reply Quote 0
          • N Offline
            NoRoots @sdetweil
            last edited by

            @sdetweil
            yes, i did the npm install after git clone.
            I tried both versions:

            npm install --only=prod --omit=dev //as seen in the tutorial
            npm install // as seen in the forum
            

            damnit…
            i just did npm install again, and now it works.
            Thanks!

            The iPad is an Gen. 8 with the latest iOS. it works just fine!

            1 Reply Last reply Reply Quote 1
            • 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