davila7/claude-code-templates · warning

Warning: Could not load marketplace details for ${name}

Error message

Warning: Could not load marketplace details for ${name}

What it means

loadMarketplaceDetails(name) tries to read a marketplace's plugin manifest (.claude-plugin/marketplace.json or similar) to compute plugin counts; on failure it warns without the underlying error and returns {pluginCount: 0}. The caller (marketplaceInfo) then renders zero plugins for that marketplace.

Source

Thrown at cli-tool/src/plugin-dashboard.js:142

    return null;
  }

  async loadMarketplaceDetails(name, config) {
    try {
      // Try to read marketplace.json from the marketplace source
      const marketplacePath = path.join(this.claudeDir, 'plugins', 'marketplaces', name);
      const marketplaceJsonPath = path.join(marketplacePath, '.claude-plugin', 'marketplace.json');

      if (await fs.pathExists(marketplaceJsonPath)) {
        const content = await fs.readFile(marketplaceJsonPath, 'utf8');
        const marketplaceData = JSON.parse(content);
        return {
          pluginCount: marketplaceData.plugins ? marketplaceData.plugins.length : 0,
          marketplaceData
        };
      }
    } catch (error) {
      console.warn(chalk.yellow(`Warning: Could not load marketplace details for ${name}`));
    }

    return { pluginCount: 0 };
  }

  getMarketplaceType(config) {
    // Handle nested source structure
    const source = config.source || config;

    if (source.source === 'github') return 'GitHub';
    if (source.source === 'git') return 'Git';
    // Support both 'local' and 'directory' for filesystem-based marketplaces
    // 'directory' is used by Claude Code, 'local' for legacy compatibility
    if (source.source === 'local' || source.source === 'directory') return 'Local';
    if (source.source === 'url') return 'URL';
    return 'Unknown';
  }

View on GitHub (pinned to a0851ed10c)

Solutions

  1. Verify the marketplace clone is complete: `cd ~/.claude/plugins/marketplaces/<name> && git status` (re-clone if broken).
  2. Confirm the manifest path the code expects (.claude-plugin/marketplace.json) exists in that repo; if upstream moved it, update the CLI.
  3. Reinstall the marketplace to refresh its clone.
  4. Wrap your call so pluginCount===0 triggers a re-sync instead of displaying empty.
Defensive patterns

Strategy: fallback

Validate before calling

const manifestPath = path.join(marketplaceDir, '.claude-plugin', 'marketplace.json');
if (!fs.existsSync(manifestPath)) return { pluginCount: 0, missing: true };

Type guard

const hasManifest = (d) => fs.existsSync(path.join(d, '.claude-plugin', 'marketplace.json'));

Try / catch

catch { console.warn(`Could not load marketplace details for ${name}`); return { pluginCount: 0 }; }

Prevention

When it happens

Trigger: Requesting details for a marketplace whose manifest file is missing (repo layout changed upstream), whose JSON is invalid, or whose local clone is incomplete/corrupted after a failed git pull.

Common situations: Marketplace repo restructures and moves its manifest, shallow/partial clones from interrupted syncs, or a marketplace name passed that doesn't match any directory.

Related errors


AI-assisted analysis of davila7/claude-code-templates@a0851ed10c (2026-08-28). Data as JSON: /api/errors/ab6f4d2410fbc619. Report an issue: GitHub.