Skip to content

[Bug] Nodejs v25 breaks our logging #4048

Closed

Description

@khassel

Environment

~/MagicMirror # node --run server
[2026-03-05 22:40:10.650] [LOG]   :pre() Starting MagicMirror: v2.35.0-develop 
[2026-03-05 22:40:10.656] [LOG]   :pre() Loading config ... 
[2026-03-05 22:40:10.656] [ERROR] :pre() Could not find config file: /root/MagicMirror/config/config.js 
~/MagicMirror # [2026-03-05 22:40:11.080] [INFO]  :pre() 
####  System Information  ####
- SYSTEM:   manufacturer: Micro Computer (HK) Tech Limited; model: Docker Container; virtual: false; MM: v2.35.0-develop
- OS:       platform: linux; distro: Alpine Linux; release: v3.23; arch: x64; kernel: 6.17.0-14-generic
- VERSIONS: electron: undefined; used node: 25.8.0; installed node: 25.8.0; npm: 11.11.0; pm2: 
- ENV:      XDG_SESSION_TYPE: undefined; MM_CONFIG_FILE: undefined
            WAYLAND_DISPLAY:  undefined; DISPLAY: undefined; ELECTRON_ENABLE_GPU: undefined
- RAM:      total: 29854.43 MB; free: 19578.37 MB; used: 10276.05 MB
- OTHERS:   uptime: 847 minutes; timeZone: UTC 

Which start option are you using?

node --run server

Are you using PM2?

No

Module

None

Have you tried disabling other modules?

  • Yes
  • No

Have you searched if someone else has already reported the issue on the forum or in the issues?

  • Yes

What did you do?

see above

What did you expect to happen?

The logs should contain the filename.

What actually happened?

instead :pre() is displayed.

Additional comments

If I try this under electron it works except for the system information line (which is started in a separate thread).
Edit: Electron uses his own node version which is v24 on develop, so this explains why it works under electron.

It took me ~2 hours to find out the reason is node v25. I tested this with 2 different docker images.

Participation

  • I am willing to submit a pull request for this change.

Activity

  1. sdetweil commented on Mar 5, 2026

    @sdetweil
  2. KristjanESPERANTO commented on Mar 5, 2026

    @KristjanESPERANTO
    Collaborator

    I think I've got it 😃 I'm preparing a PR.

  3. added a commit that references this issue on Mar 6, 2026
    0e7f415
  4. KristjanESPERANTO commented on Mar 6, 2026

    @KristjanESPERANTO
    Collaborator

    I also see potential for improving the logger in general. I'll put that in a PR by the weekend at the latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions