MagicMirrorOrg/MagicMirror · warning
No ${moduleFile} found for module: ${moduleName}.
Error message
No ${moduleFile} found for module: ${moduleName}. What it means
During server startup, loadModule checks that the module's main file (<folder>/<name>.js) exists and is readable via fs.accessSync(R_OK). If that fails it warns 'No <moduleFile> found for module: <name>.' and continues loading (the helper check follows). It indicates the module folder exists but its entrypoint script is missing or unreadable.
Source
Thrown at js/app.js:99
if (defaultModules.includes(moduleName)) {
const defaultModuleFolder = path.resolve(`${global.root_path}/${global.defaultModulesDir}/`, module);
if (!global.mmTestMode) {
moduleFolder = defaultModuleFolder;
} else {
// running in test mode, allow defaultModules placed under moduleDir for testing
if (env.modulesDir === "modules" || env.modulesDir === "tests/mocks") {
moduleFolder = defaultModuleFolder;
}
}
}
const moduleFile = `${moduleFolder}/${moduleName}.js`;
try {
fs.accessSync(moduleFile, fs.constants.R_OK);
} catch {
Log.warn(`No ${moduleFile} found for module: ${moduleName}.`);
}
const helperPath = `${moduleFolder}/node_helper.js`;
let loadHelper = true;
try {
fs.accessSync(helperPath, fs.constants.R_OK);
} catch {
loadHelper = false;
Log.log(`No helper found for module: ${moduleName}.`);
}
// if the helper was found
if (loadHelper) {
let Module;
try {
Module = require(helperPath);
} catch (e) {View on GitHub (pinned to 4b4a59534f)
Solutions
- Verify `<modules>/<moduleFolder>/<moduleName>.js` exists; re-clone or reinstall the module if missing.
- Check file permissions (chmod so the MagicMirror user can read it).
- Ensure the module name in config.js exactly matches the file/folder name including case.
- If the module is intentionally fileless, correct the config entry or remove it.
Example fix
// before (config.js)
{ module: "weather", ... } // but folder contains weathr.js
// after
{ module: "weather" } with defaultmodules/weather/weather.js present Defensive patterns
Strategy: validation
Validate before calling
const fs = require("fs");
const moduleFile = `${moduleFolder}/${moduleName}.js`;
if (!fs.existsSync(moduleFile)) {
throw new Error(`Module entry file missing: ${moduleFile}`);
} Type guard
function moduleEntryExists(modulesPath, name) {
return fs.existsSync(`${modulesPath}/${name}/${name}.js`);
} Prevention
- Install modules via git clone of the full repository, not partial copies.
- Verify module name casing matches the actual file/folder names.
- Check .gitignore rules if you commit custom modules to your own repo.
- Confirm file read permissions for the user running MagicMirror.
When it happens
Trigger: Module directory present in the modules folder but the <moduleName>.js file was deleted, renamed, or never committed; permission bits deny read access; name in config.js differs in case from the actual file on a case-sensitive filesystem.
Common situations: Partial git clone/checkout (file ignored by .gitignore); manually created folder scaffolding without the main js file; renaming the module file without updating config.js; running as a user without read permission on the module.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- WARNING! Your custom css file was moved from ${global.root_p
- Latitude and longitude are required
- Unknown weather type: ${this.config.type}
- siteCode and provCode are required
- Unknown weather type: ${this.config.type}
AI-assisted analysis of MagicMirrorOrg/MagicMirror@4b4a59534f (2026-08-31).
Data as JSON: /api/errors/8ec405328ad50e25.
Report an issue: GitHub.