{"record":{"id":"f37e66ba3f958634","repo":"bmad-code-org/BMAD-METHOD","slug":"module-modulename-is-not-installed","errorCode":null,"errorMessage":"Module '${moduleName}' is not installed","messagePattern":"Module '(.+?)' is not installed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"tools/installer/modules/official-modules.js","lineNumber":442,"sourceCode":"      },\n    };\n  }\n\n  /**\n   * Update an existing module\n   * @param {string} moduleName - Name of the module to update\n   * @param {string} bmadDir - Target bmad directory\n   */\n  async update(moduleName, bmadDir) {\n    const sourcePath = await this.findModuleSource(moduleName);\n    const targetPath = path.join(bmadDir, moduleName);\n\n    if (!sourcePath) {\n      throw new Error(`Module '${moduleName}' not found in any source location`);\n    }\n\n    if (!(await fs.pathExists(targetPath))) {\n      throw new Error(`Module '${moduleName}' is not installed`);\n    }\n\n    await this.syncModule(sourcePath, targetPath);\n\n    return {\n      success: true,\n      module: moduleName,\n      path: targetPath,\n    };\n  }\n\n  /**\n   * Remove a module\n   * @param {string} moduleName - Name of the module to remove\n   * @param {string} bmadDir - Target bmad directory\n   */\n  async remove(moduleName, bmadDir) {\n    const targetPath = path.join(bmadDir, moduleName);","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/bmad-code-org/BMAD-METHOD/blob/b70486b9bdcb0a404d329e2a763b57964e7f1360/tools/installer/modules/official-modules.js#L424-L460","documentation":"Thrown by OfficialModules.update after findModuleSource succeeded but fs.pathExists(bmadDir/moduleName) is false. The module's source is reachable but no installed copy exists at the target, so syncModule has nothing to update. Distinct from error 41: source resolves, target is missing.","triggerScenarios":"Calling installer.update('somemodule', bmadDir) when bmadDir/somemodule was never installed, was removed out-of-band, or bmadDir points at the wrong location.","commonSituations":"Calling update instead of install for a new module; the module directory was deleted manually; wrong bmadDir passed (typo, relative path); install was interrupted leaving manifest but no directory.","solutions":["Run installer.install(moduleName, bmadDir) first to lay down the module, then update.","Verify bmadDir is the correct absolute _bmad/ path containing the module directory.","Check _bmad/manifest.json — if the module isn't listed, install is the correct action, not update."],"exampleFix":"// before\n//   await modules.update('bmm', bmadDir);  // -> Module 'bmm' is not installed\n//\n// after\n//   await modules.install('bmm', bmadDir);\n//   await modules.update('bmm', bmadDir);","handlingStrategy":"validation","validationCode":"if (!(await modules.isInstalled(moduleName, bmadDir))) {\n  await modules.install(moduleName, bmadDir);\n}\nawait modules.update(moduleName, bmadDir);","typeGuard":null,"tryCatchPattern":"try {\n  await modules.update(moduleName, bmadDir);\n} catch (e) {\n  if (/is not installed/.test(e.message)) {\n    await modules.install(moduleName, bmadDir);\n  } else { throw e; }\n}","preventionTips":["Gate update behind isInstalled so the no-target case becomes an install instead of an error.","Validate bmadDir is the absolute _bmad/ path before calling lifecycle methods."],"tags":["installer","update","module-state","filesystem"],"backgroundTag":null,"analyzedSha":"b70486b9bdcb0a404d329e2a763b57964e7f1360","analyzedAt":"2026-08-13T01:21:12.247Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}