Troubleshooting MagicMirror Configuration File Errors

MagicMirror is an open-source project that lets you turn your Raspberry Pi or personal computer into a smart mirror. It delivers useful information, ensuring you’re always updated with the latest weather reports, news feeds, compliments,

Written by: Sophia Martin

Published on: March 14, 2026

MagicMirror is an open-source project that lets you turn your Raspberry Pi or personal computer into a smart mirror. It delivers useful information, ensuring you’re always updated with the latest weather reports, news feeds, compliments, calendar events, and more. While configuring or adding new modules to your MagicMirror, you might occasionally run into errors. This post will guide you on how to troubleshoot MagicMirror configuration file errors, ensuring smooth and continuous operation.

MagicMirror Configuration File Anatomy

Before we can troubleshoot, it’s essential to understand the structure of the MagicMirror configuration file. The configuration file, config.js, holds the settings for MagicMirror. It’s written in JavaScript Object Notation (JSON), a standard data interchange format that is easy to read and write.

Each module has its own configuration wrapped inside a pair of curly braces { }. The contents of these braces include parameters like “module”, “position”, and “config”. Also, there is a comma (,) after every module except the last one.

The common structure of the default configuration file looks something like this:

var config = {
    port: 8080,
    ipWhitelist: [...],
    language: 'en',
    timeFormat: 24,
    units: 'metric',
    modules: [
        {
            module: 'alert',
        },
        {
            module: 'compliments',
            position: 'lower_third',
        },
        […]
    ]
}

if (typeof module !== 'undefined') { module.exports = config; }

Common Issues and Solution

Issue 1: Syntax Error

One of the most frequent problems when working with config.js is syntax errors, usually caused by missing or misplaced braces or commas.

Solution: Enable syntax highlighting in your text editor. This will highlight different parts of the code in different colors, making it easier to spot errors. If you’re still unable to find it, copy the contents of your file to a JSON validator tool like JSONLint. It will identify and help you correct the syntax error.

Issue 2: Whitelist Errors

By default, MagicMirror only allows localhost connection. If you’re trying to access MagicMirror from a different device, you’ll need to modify the IP whitelist.

Solution: Either add the device IP to the ipWhitelist or turn off the whitelist by replacing the ipWhitelist content with [“0.0.0.0/0”].

Issue 3: Incorrect or Misplaced Module Parameters

If your module isn’t working correctly, double-check that you’ve provided all required parameters, and they’re correctly placed inside the “config: {}” block.

Solution: Cross-check with the module’s documentation on GitHub to ensure all required parameters are declared and correctly placed.

Issue 4: Incompatible Modules

Sometimes, the issue may not be with your configuration file, but with the module itself. A module may be outdated or incompatible with the current MagicMirror version.

Solution: Check the module’s GitHub repository for updates. If the module is no longer maintained, you might want to consider replacing it with a similar, up-to-date module.

Keeping Backups of Config.js

To avoid losing your data, always keep a backup of your config.js file. A straightforward approach is to create a copy of the file whenever you make significant changes.

Leveraging MagicMirror’s Debugging Mode

MagicMirror’s debugging mode is a useful tool when troubleshooting problematic issues. To enable debugger mode, use the following command:

npm start dev.

Then, select the Console tab in the electron inspector to view potential errors relating to your configuration file or modules.

Utilizing the MagicMirror Community

In case your error persists after using these troubleshooting steps, don’t fret! The MagicMirror community is vast, active, and consists of many people ready to help. You can post details of your problem on MagicMirror Forum and get a response from experienced users.

In conclusion, configuring MagicMirror should be a rewarding experience. With the understanding of the config.js file structure and possible error sources, troubleshooting becomes a much less daunting task. Remember to have diligent syntax practices, leverage debugging tools, and be part of the community forums.

Leave a Comment

Previous

Troubleshooting MagicMirror Configuration File Errors