Read the statement by Michael Teeuw here.
Error: Cannot find module 'node:fs'
-
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:8080I have watchtower running, but there haven’t been any updates to this image since it was deployed a couple of months ago.
-
@Husband i do not know… that container is fairly old…
I use the one from karsten13
https://khassel.gitlab.io/magicmirror/he is away for a few days.
-
@sdetweil thank you for the tip. I’ve at least got things running again with this image. I’ll need to make some adjustments to get things working 100% but at least the container starts and runs now.
Very strange, since there didn’t appear to be any updates to the old image I was using.
-
S sdetweil has marked this topic as solved on
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