Skip to content

[Bug] fatal syntax error in config.js not detected, but MM dies #3785

Description

@sdetweil

Environment

doesn't matter

Which start option are you using?

npm run start

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?

Configuration

use the config.js.sample
add _ before let config

_
let config = {

Steps to reproduce the issue:

issue npm start

What did you expect to happen?

mm would report an error
npm run config:check reports no error

What actually happened?

(base) sam@sams:~/MagicMirror$ npm start 

> magicmirror@2.32.0-develop start
> node --run start:x11

[2025-05-11 17:50:42.970] [LOG]   Starting MagicMirror: v2.32.0-develop 
[2025-05-11 17:50:42.984] [LOG]   Loading config ... 
[2025-05-11 17:50:42.985] [LOG]   config template file not exists, no envsubst 
[2025-05-11 17:50:43.085] [INFO]  Checking config file /home/sam/MagicMirror/config/config.js ... 
[2025-05-11 17:50:43.101] [INFO]  Your configuration file doesn't contain syntax errors :) 
[2025-05-11 17:50:43.101] [INFO]  Checking modules structure configuration ... 
[2025-05-11 17:50:43.120] [ERROR] _ is not defined 

mm ends immediately

Additional comments

No response

Participation

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions