{"record":{"id":"8355d5bda5949d56","repo":"davila7/claude-code-templates","slug":"warning-error-loading-plugins-from-marketplace","errorCode":null,"errorMessage":"Warning: Error loading plugins from marketplace ${marketplaceName}","messagePattern":"Warning: Error loading plugins from marketplace (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli-tool/src/plugin-dashboard.js","lineNumber":300,"sourceCode":"            name: pluginDef.name,\n            version: pluginDef.version || '1.0.0',\n            description: pluginDef.description || 'No description',\n            marketplace: marketplaceName,\n            path: pluginSourcePath,\n            components,\n            author: pluginDef.author,\n            homepage: pluginDef.homepage,\n            license: pluginDef.license,\n            keywords: pluginDef.keywords || [],\n            category: pluginDef.category,\n            enabled\n          });\n        } catch (error) {\n          console.warn(chalk.yellow(`Warning: Error processing plugin ${pluginDef.name}`), error.message);\n        }\n      }\n    } catch (error) {\n      console.warn(chalk.yellow(`Warning: Error loading plugins from marketplace ${marketplaceName}`), error.message);\n    }\n\n    return plugins;\n  }\n\n  async isPluginEnabled(pluginName, marketplace) {\n    // Check if plugin is enabled in settings.json\n    // Plugins are stored as \"plugin-name@marketplace-name\": true\n    const pluginKey = `${pluginName}@${marketplace}`;\n    return this.enabledPlugins && this.enabledPlugins.has(pluginKey);\n  }\n\n  async countPluginComponents(pluginPath) {\n    const components = {\n      agents: 0,\n      commands: 0,\n      hooks: 0,\n      mcps: 0","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/plugin-dashboard.js#L282-L318","documentation":"This warning is emitted by the plugin dashboard's loadPluginsFromMarketplace when any unexpected error escapes the per-plugin processing loop while loading a Claude Code plugin marketplace (parsing .claude-plugin/marketplace.json, reading plugin definitions, or resolving plugin paths). It is a catch-all console.warn, not a thrown exception — the function still returns whatever plugins were collected before the failure. It usually indicates the marketplace JSON is malformed or a plugin entry references a missing/unreadable path.","triggerScenarios":"Calling loadPluginsFromMarketplace (or the marketplacePlugins getter) against a marketplace whose .claude-plugin/marketplace.json is invalid JSON, has an unexpected schema (missing plugins array, wrong field names), or contains plugin entries pointing at directories that do not exist or cannot be read (permissions, symlink loops).","commonSituations":"Hand-edited marketplace.json with trailing commas or comments; marketplace schema changed between Claude Code versions; cloned marketplace repo with submodules not initialized; plugin entries with relative source paths that don't resolve from the marketplace root.","solutions":["Validate the marketplace's .claude-plugin/marketplace.json with a JSON linter (e.g. `npx ajv validate` or `jq . marketplace.json`)","Check that every plugin entry's source/path resolves to an existing directory under the marketplace root","Re-clone or restore the marketplace from its canonical source to eliminate partial downloads / uninitialized submodules","If the schema changed, update the marketplace to the format expected by the current CLI version"],"exampleFix":"// before\n\"plugins\": [\n  { \"name\": \"my-plugin\", \"source\": \"./plugins/my-plugin\" }\n]\n// after (ensure referenced dir exists and JSON is valid)\nmkdir -p plugins/my-plugin\necho '{\"name\":\"my-plugin\"}' > plugins/my-plugin/.claude-plugin/plugin.json\nnpx jq . .claude-plugin/marketplace.json > /dev/null && echo OK","handlingStrategy":"validation","validationCode":"const fs = require('fs-extra');\nasync function marketplaceLooksValid(dir) {\n  const mf = path.join(dir, '.claude-plugin', 'marketplace.json');\n  if (!(await fs.pathExists(mf))) return false;\n  try {\n    const data = JSON.parse(await fs.readFile(mf, 'utf8'));\n    return Array.isArray(data.plugins);\n  } catch { return false; }\n}","typeGuard":null,"tryCatchPattern":"catch (error) {\n  console.warn(`Skipping marketplace ${marketplaceName}: ${error.message}`);\n  return []; // treat as empty marketplace, don't crash the dashboard\n}","preventionTips":["Validate marketplace.json with a JSON linter before adding the marketplace","Pin marketplace sources to released tags rather than branches","Run `claude plugin validate` (or equivalent) after hand-editing manifests"],"tags":["plugin-marketplace","json-parse","claude-code","filesystem"],"backgroundTag":"marketplace-manifest-invalid","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}