Read the statement by Michael Teeuw here.
Magicmirror in Kubernetes
-
Hello,
I do want to run Magicmirror in my Kubernetes cluster, but the image doesn’t start.
When the pod is starting, it’s crashing with this error:magicmirror@2.25.0 server
node ./serveronlynode:internal/modules/cjs/loader:1147
throw err;
^Error: Cannot find module ‘/opt/magic_mirror/js/…/modules/default/defaultmodules’
Require stack:- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/serveronly/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._resolveFilename (/opt/magic_mirror/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object. (/opt/magic_mirror/js/app.js:17:24)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object. (/opt/magic_mirror/serveronly/index.js:1:13)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32) {
code: ‘MODULE_NOT_FOUND’,
requireStack: [
‘/opt/magic_mirror/js/app.js’,
‘/opt/magic_mirror/serveronly/index.js’
]
}
Node.js v20.10.0
npm notice
npm notice New patch version of npm available! 10.2.3 -> 10.2.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.5
npm notice Runnpm install -g npm@10.2.5to update!
npm noticeWhen I login to the pod and run ’ npm run server’, I do see the same message.
I have mounted /config, /css and /modules to persistent volumes. Because this is an initial deployment, all volumes are still empty.
Any ideas?
Gerben
-
I think I have the solution for this error.
Had to run the entrypoint.sh script. That copies all default modules to correct folder. -
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