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.

    Error: Cannot find module 'node:fs'

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    3 Posts 2 Posters 26 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.
    • H Offline
      Husband
      last edited by

      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.

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @Husband
        last edited by

        @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.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          Husband @sdetweil
          last edited by

          @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.

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