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

  1. Verify `<modules>/<moduleFolder>/<moduleName>.js` exists; re-clone or reinstall the module if missing.
  2. Check file permissions (chmod so the MagicMirror user can read it).
  3. Ensure the module name in config.js exactly matches the file/folder name including case.
  4. 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

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


AI-assisted analysis of MagicMirrorOrg/MagicMirror@4b4a59534f (2026-08-31). Data as JSON: /api/errors/8ec405328ad50e25. Report an issue: GitHub.