{"record":{"id":"d4b09468fb90e4cd","repo":"davila7/claude-code-templates","slug":"warning-error-loading-marketplaces","errorCode":null,"errorMessage":"Warning: Error loading marketplaces","messagePattern":"Warning: Error loading marketplaces","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli-tool/src/plugin-dashboard.js","lineNumber":115,"sourceCode":"\n        // Check if marketplace is enabled (exists in the filesystem)\n        const marketplacePath = path.join(this.claudeDir, 'plugins', 'marketplaces', name);\n        const enabled = await fs.pathExists(marketplacePath);\n\n        marketplaces.push({\n          name,\n          source: config,\n          type: this.getMarketplaceType(config),\n          enabled,\n          pluginCount: marketplaceInfo.pluginCount || 0,\n          lastUpdated: config.lastUpdated || null,\n          url: this.getMarketplaceUrl(config)\n        });\n      }\n\n      return marketplaces;\n    } catch (error) {\n      console.warn(chalk.yellow('Warning: Error loading marketplaces'), error.message);\n      return [];\n    }\n  }\n\n  getMarketplaceUrl(config) {\n    const source = config.source || config;\n    if (source.url) return source.url;\n    if (source.repo) return `https://github.com/${source.repo}`;\n    return null;\n  }\n\n  async loadMarketplaceDetails(name, config) {\n    try {\n      // Try to read marketplace.json from the marketplace source\n      const marketplacePath = path.join(this.claudeDir, 'plugins', 'marketplaces', name);\n      const marketplaceJsonPath = path.join(marketplacePath, '.claude-plugin', 'marketplace.json');\n\n      if (await fs.pathExists(marketplaceJsonPath)) {","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/plugin-dashboard.js#L97-L133","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"for (const m of marketplaces) {\n  const dir = resolveMarketplaceDir(m);\n  if (!fs.existsSync(dir)) continue; // skip missing marketplace\n}","typeGuard":null,"tryCatchPattern":"catch (e) { if (e.code === 'ENOENT') console.warn(`Marketplace directory missing: ${dir}`); return []; }","preventionTips":["Existence-check each marketplace directory before loading.","Clean up settings.json entries when uninstalling a marketplace."],"tags":["marketplace","filesystem","config"],"backgroundTag":"missing-marketplace-directory","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}