Read the statement by Michael Teeuw here.
Cannot find module 'module-alias/register'
-
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 -
@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 forumdamnit…
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!
-
@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…
-
@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 forumdamnit…
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!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login