Hi folks, I have a pretty vanilla config of MagicMirror running in a container stack on Portainer and have suddenly started to get the following error when starting the container:
[21.11.2025 10:52.25.515] [ERROR] Error: Cannot find module 'node:fs'
Require stack:
- /opt/magic_mirror/modules/MMM-MyScoreboard/node_helper.js
- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/serveronly/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._resolveFilename (/opt/magic_mirror/node_modules/module-alias/index.js:49:29)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/opt/magic_mirror/modules/MMM-MyScoreboard/node_helper.js:4:12)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/magic_mirror/modules/MMM-MyScoreboard/node_helper.js',
'/opt/magic_mirror/js/app.js',
'/opt/magic_mirror/serveronly/index.js'
]
}
I’ve not made any intentional changes to the environment (I know, I know) and this suddenly began yesterday. I’ve not modified anything in the modules or config directories. I haven’t touched this env in 3 weeks and its been running fine.
Here is my docker compose:
version: '1'
services:
magicmirror:
container_name: magicmirror
image: bastilimbach/docker-magicmirror
#restart: unless-stopped
environment:
- PUID=1035 # magicmirror user on Synology
- PGID=100
- TZ=America/Toronto
volumes:
- /volume1/docker/magicmirror/config:/opt/magic_mirror/config
- /volume1/docker/magicmirror/modules:/opt/magic_mirror/modules
ports:
- 8888:8080
I have watchtower running, but there haven’t been any updates to this image since it was deployed a couple of months ago.