can1357/oh-my-pi · error · Error

Plugin "${name}" not found in marketplace "${marketplace}"

Error message

Plugin "${name}" not found in marketplace "${marketplace}"

What it means

After resolving the marketplace entry, installPlugin fetches the marketplace catalog (#readCatalog) and searches catalog.plugins for a plugin whose name matches. This error is thrown when the marketplace exists but does not publish a plugin with the requested name.

Source

Thrown at packages/coding-agent/src/extensibility/plugins/marketplace/manager.ts:261

		marketplace: string,
		options?: { force?: boolean; scope?: "user" | "project" },
	): Promise<InstalledPluginEntry> {
		const force = options?.force ?? false;
		const scope = options?.scope ?? "user";
		const registryPath = this.#registryPath(scope);

		// 1. Find marketplace entry
		const mktReg = await readMarketplacesRegistry(this.#opts.marketplacesRegistryPath);
		const mktEntry = getMarketplaceEntry(mktReg, marketplace);
		if (!mktEntry) {
			throw new Error(`Marketplace "${marketplace}" not found`);
		}

		// 2. Find plugin in catalog
		const catalog = await this.#readCatalog(mktEntry);
		const pluginEntry = catalog.plugins.find(p => p.name === name);
		if (!pluginEntry) {
			throw new Error(`Plugin "${name}" not found in marketplace "${marketplace}"`);
		}

		const pluginId = buildPluginId(name, marketplace);

		// 3. Check if already installed
		const instReg = await readInstalledPluginsRegistry(registryPath);
		const existing = getInstalledPlugin(instReg, pluginId);
		if (existing && existing.length > 0 && !force) {
			throw new Error(`Plugin "${pluginId}" is already installed. Use force option to reinstall.`);
		}

		// 4. Resolve source path.
		// marketplaceClonePath is the marketplace root — the directory containing .claude-plugin/
		// catalogPath is <marketplacesCacheDir>/<name>/marketplace.json, so the root is two levels up.
		// For local sources the content was fetched from a local path; the stored catalog is a copy
		// under marketplacesCacheDir. We need the original source root for resolving relative paths.
		// Use: path.dirname(catalogPath) is <cacheDir>/<name>/, and that IS the stored copy root,
		// so `path.resolve(mktEntry.catalogPath, "../..")` = parent of <name>/ inside cacheDir

View on GitHub (pinned to 9690622007)

Solutions

  1. List the plugins in the marketplace catalog to get exact names, then retry with the correct name
  2. Check the upstream marketplace.json for renames or removals and refresh the cached catalog
  3. Update the marketplace entry so the catalog is re-fetched from the source
  4. Verify you are targeting the marketplace that actually publishes this plugin

Example fix

// before
await manager.installPlugin("prettier-formater", "community");
// after
await manager.installPlugin("prettier-formatter", "community"); // name matches catalog.plugins[].name
Defensive patterns

Strategy: validation

Validate before calling

const catalog = await manager.getMarketplaceCatalog(marketplace); // or read via #readCatalog-equivalent public API
if (!catalog.plugins.some(p => p.name === pluginName)) {
  throw new Error(`${pluginName} not in ${marketplace}; available: ${catalog.plugins.map(p => p.name).join(", ")}`);
}
await manager.installPlugin(pluginName, marketplace);

Try / catch

try {
  await manager.installPlugin(name, marketplace);
} catch (err) {
  if (err instanceof Error && err.message.includes('not found in marketplace')) {
    logger.warn(`Unknown plugin ${name}; refresh marketplace or fix name`, { name, marketplace });
  } else throw err;
}

Prevention

When it happens

Trigger: installPlugin(name, marketplace) — directly or via upgradePlugin — where the marketplace's marketplace.json catalog contains no plugin entry with the exact given name.

Common situations: Typo in the plugin name; the plugin was renamed or removed upstream; browsing an out-of-date cached catalog after the marketplace updated; confusing a plugin's display/CLI label with its catalog name.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/b5ed5be7e4ece910. Report an issue: GitHub.