davila7/claude-code-templates · warning
Warning: Error loading marketplaces
Error message
Warning: Error loading marketplaces
What it means
loadMarketplaces() aggregates marketplace config lookups and warns when anything in that loop throws — typically a marketplace directory missing (ENOENT) when resolving plugin marketplaces, or an unexpected config object shape. It returns [] so the dashboard shows no marketplaces rather than crashing.
Source
Thrown at cli-tool/src/plugin-dashboard.js:115
// Check if marketplace is enabled (exists in the filesystem)
const marketplacePath = path.join(this.claudeDir, 'plugins', 'marketplaces', name);
const enabled = await fs.pathExists(marketplacePath);
marketplaces.push({
name,
source: config,
type: this.getMarketplaceType(config),
enabled,
pluginCount: marketplaceInfo.pluginCount || 0,
lastUpdated: config.lastUpdated || null,
url: this.getMarketplaceUrl(config)
});
}
return marketplaces;
} catch (error) {
console.warn(chalk.yellow('Warning: Error loading marketplaces'), error.message);
return [];
}
}
getMarketplaceUrl(config) {
const source = config.source || config;
if (source.url) return source.url;
if (source.repo) return `https://github.com/${source.repo}`;
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)) {View on GitHub (pinned to a0851ed10c)
Solutions
- Check that the marketplace directories named in settings.json actually exist (`ls ~/.claude/plugins/marketplaces`).
- Re-add the marketplace via the CLI install command to regenerate its config.
- Remove stale marketplace entries from settings.json for directories you deleted.
- Inspect error.message (printed after the warning) to distinguish ENOENT from EACCES.
Defensive patterns
Strategy: try-catch
Validate before calling
for (const m of marketplaces) {
const dir = resolveMarketplaceDir(m);
if (!fs.existsSync(dir)) continue; // skip missing marketplace
} Try / catch
catch (e) { if (e.code === 'ENOENT') console.warn(`Marketplace directory missing: ${dir}`); return []; } Prevention
- Existence-check each marketplace directory before loading.
- Clean up settings.json entries when uninstalling a marketplace.
When it happens
Trigger: Starting the plugin dashboard when ~/.claude/plugins/marketplaces is referenced but absent, a marketplace entry whose source is neither string nor object with the expected fields, or a permissions error reading the marketplace config.
Common situations: First run before any marketplace is added, a partial uninstall leaving stale entries in settings.json, or a marketplace repo cloned to a custom path that has since moved.
Related errors
- Warning: Could not load marketplace details for ${name}
- No files were copied from Cloudflare component directory
- Claude Code projects directory not found at ${this.projectsD
- Failed to load skill
- File not found
AI-assisted analysis of davila7/claude-code-templates@a0851ed10c (2026-08-28).
Data as JSON: /api/errors/d4b09468fb90e4cd.
Report an issue: GitHub.