{"record":{"id":"8ec405328ad50e25","repo":"MagicMirrorOrg/MagicMirror","slug":"no-modulefile-found-for-module-modulename","errorCode":null,"errorMessage":"No ${moduleFile} found for module: ${moduleName}.","messagePattern":"No (.+?) found for module: (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"js/app.js","lineNumber":99,"sourceCode":"\n\t\tif (defaultModules.includes(moduleName)) {\n\t\t\tconst defaultModuleFolder = path.resolve(`${global.root_path}/${global.defaultModulesDir}/`, module);\n\t\t\tif (!global.mmTestMode) {\n\t\t\t\tmoduleFolder = defaultModuleFolder;\n\t\t\t} else {\n\t\t\t\t// running in test mode, allow defaultModules placed under moduleDir for testing\n\t\t\t\tif (env.modulesDir === \"modules\" || env.modulesDir === \"tests/mocks\") {\n\t\t\t\t\tmoduleFolder = defaultModuleFolder;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst moduleFile = `${moduleFolder}/${moduleName}.js`;\n\n\t\ttry {\n\t\t\tfs.accessSync(moduleFile, fs.constants.R_OK);\n\t\t} catch {\n\t\t\tLog.warn(`No ${moduleFile} found for module: ${moduleName}.`);\n\t\t}\n\n\t\tconst helperPath = `${moduleFolder}/node_helper.js`;\n\n\t\tlet loadHelper = true;\n\t\ttry {\n\t\t\tfs.accessSync(helperPath, fs.constants.R_OK);\n\t\t} catch {\n\t\t\tloadHelper = false;\n\t\t\tLog.log(`No helper found for module: ${moduleName}.`);\n\t\t}\n\n\t\t// if the helper was found\n\t\tif (loadHelper) {\n\t\t\tlet Module;\n\t\t\ttry {\n\t\t\t\tModule = require(helperPath);\n\t\t\t} catch (e) {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/MagicMirrorOrg/MagicMirror/blob/4b4a59534f7da01e4030e46029fe9dd649a7675e/js/app.js#L81-L117","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (config.js)\n{ module: \"weather\", ... } // but folder contains weathr.js\n// after\n{ module: \"weather\" } with defaultmodules/weather/weather.js present","handlingStrategy":"validation","validationCode":"const fs = require(\"fs\");\nconst moduleFile = `${moduleFolder}/${moduleName}.js`;\nif (!fs.existsSync(moduleFile)) {\n  throw new Error(`Module entry file missing: ${moduleFile}`);\n}","typeGuard":"function moduleEntryExists(modulesPath, name) {\n  return fs.existsSync(`${modulesPath}/${name}/${name}.js`);\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["filesystem","module-loading","config"],"backgroundTag":"file-not-found","analyzedSha":"4b4a59534f7da01e4030e46029fe9dd649a7675e","analyzedAt":"2026-08-31T21:49:42.591Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}