bmad-code-org/BMAD-METHOD · error · Error

Module '${moduleName}' is registered as a marketplace plugin

Error message

Module '${moduleName}' is registered as a marketplace plugin but its skills could not be resolved from .claude-plugin/marketplace.json (missing or malformed on the selected channel). Aborting to avoid a partial install with no skills.

What it means

Thrown by OfficialModules.install() when a module is flagged as marketplacePlugin in the registry but getPluginResolution() returns null or an object with no skillPaths. This means the PluginResolver could not resolve any skills from the module's .claude-plugin/marketplace.json on the selected channel. The error is thrown deliberately to prevent a partial install that would have module.yaml but no actual skills.

Source

Thrown at tools/installer/modules/official-modules.js:293

    if (await fs.pathExists(targetPath)) {
      await fs.remove(targetPath);
    }

    // Marketplace-plugin registry modules keep their installable skills outside
    // the directory that holds module.yaml (sourcePath points at the -setup
    // skill's assets/), so they cannot be installed by copying sourcePath. Copy
    // the resolved skill directories instead, matching how custom marketplace
    // installs lay out a module. Everything else (manifest, version info) flows
    // through the standard external-module path below.
    const moduleInfo = await this.externalModuleManager.getModuleByCode(moduleName);
    if (moduleInfo && moduleInfo.marketplacePlugin) {
      const pluginResolution = this.externalModuleManager.getPluginResolution(moduleName);
      // Fail loud: copying sourcePath here would install only the -setup skill's
      // assets/ (module.yaml + module-help.csv) and none of the skills — a
      // silent, broken partial install. Abort instead.
      if (!pluginResolution || !Array.isArray(pluginResolution.skillPaths) || pluginResolution.skillPaths.length === 0) {
        throw new Error(
          `Module '${moduleName}' is registered as a marketplace plugin but its skills could not be resolved ` +
            `from .claude-plugin/marketplace.json (missing or malformed on the selected channel). ` +
            `Aborting to avoid a partial install with no skills.`,
        );
      }
      await this._copyResolvedSkills(pluginResolution, targetPath, fileTrackingCallback, options.moduleConfig);
    } else {
      await this.copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback, options.moduleConfig);
    }

    if (!options.skipModuleInstaller) {
      await this.createModuleDirectories(moduleName, bmadDir, options);
    }

    const { Manifest } = require('../core/manifest');
    const manifestObj = new Manifest();
    const versionInfo = await manifestObj.getModuleVersionInfo(moduleName, bmadDir, sourcePath);

View on GitHub (pinned to b70486b9bd)

Solutions

  1. Reinstall with --next=<moduleName> to get the latest main branch which may have a valid marketplace.json.
  2. Pin to a known-good tag that has a complete .claude-plugin/marketplace.json.
  3. Verify the module's repository contains a valid .claude-plugin/marketplace.json with at least one plugin that has a skills array.
  4. Check that the registry's plugin_name matches a plugin name in the marketplace.json.

Example fix

# before — stable tag has malformed marketplace.json
npx bmad-method install
# Error: skills could not be resolved from marketplace.json

# after — use latest main
npx bmad-method install --next=my-module
# or pin a known-good version
npx bmad-method install --pin my-module=v2.1.0
Defensive patterns

Strategy: fallback

Validate before calling

// Pre-check marketplace-plugin resolution before install
const moduleInfo = await extMgr.getModuleByCode(moduleName);
if (moduleInfo && moduleInfo.marketplacePlugin) {
  // Force resolve on --next to get the latest marketplace.json
  const resolved = await extMgr.resolvePluginModule(moduleName, options);
  if (!resolved || !resolved.skillPaths || resolved.skillPaths.length === 0) {
    throw new Error(`Cannot install marketplace plugin '${moduleName}': no skills resolvable. Try --next.`);
  }
}

Try / catch

try {
  await officialModules.install(moduleName, bmadDir, fileTrackingCallback, options);
} catch (e) {
  if (e.message.includes('skills could not be resolved')) {
    // Retry with --next to get a potentially valid marketplace.json
    console.log('Marketplace.json invalid on stable. Retrying with --next...');
    await officialModules.install(moduleName, bmadDir, fileTrackingCallback, {
      ...options,
      channelOptions: { nextSet: new Set([moduleName]) },
    });
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: Installing a marketplace-plugin registry module where the cloned ref's .claude-plugin/marketplace.json is missing, malformed, or has no plugins with a skills array. The resolvePluginModule() method returned null and cached nothing in _pluginResolutions.

Common situations: The stable tag's marketplace.json was never created or was corrupted; the channel switch (stable to next or vice versa) pulled a ref where the marketplace.json doesn't match the expected schema; the plugin_name in the registry doesn't match any plugin in marketplace.json; the PluginResolver threw an error resolving all plugins.

Understand the failure class

Related errors


AI-assisted analysis of bmad-code-org/BMAD-METHOD@b70486b9bd (2026-08-13). Data as JSON: /api/errors/78b9eb9ccc730a08. Report an issue: GitHub.