{"record":{"id":"b5ed5be7e4ece910","repo":"can1357/oh-my-pi","slug":"plugin-name-not-found-in-marketplace-marke","errorCode":null,"errorMessage":"Plugin \"${name}\" not found in marketplace \"${marketplace}\"","messagePattern":"Plugin \"(.+?)\" not found in marketplace \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/extensibility/plugins/marketplace/manager.ts","lineNumber":261,"sourceCode":"\t\tmarketplace: string,\n\t\toptions?: { force?: boolean; scope?: \"user\" | \"project\" },\n\t): Promise<InstalledPluginEntry> {\n\t\tconst force = options?.force ?? false;\n\t\tconst scope = options?.scope ?? \"user\";\n\t\tconst registryPath = this.#registryPath(scope);\n\n\t\t// 1. Find marketplace entry\n\t\tconst mktReg = await readMarketplacesRegistry(this.#opts.marketplacesRegistryPath);\n\t\tconst mktEntry = getMarketplaceEntry(mktReg, marketplace);\n\t\tif (!mktEntry) {\n\t\t\tthrow new Error(`Marketplace \"${marketplace}\" not found`);\n\t\t}\n\n\t\t// 2. Find plugin in catalog\n\t\tconst catalog = await this.#readCatalog(mktEntry);\n\t\tconst pluginEntry = catalog.plugins.find(p => p.name === name);\n\t\tif (!pluginEntry) {\n\t\t\tthrow new Error(`Plugin \"${name}\" not found in marketplace \"${marketplace}\"`);\n\t\t}\n\n\t\tconst pluginId = buildPluginId(name, marketplace);\n\n\t\t// 3. Check if already installed\n\t\tconst instReg = await readInstalledPluginsRegistry(registryPath);\n\t\tconst existing = getInstalledPlugin(instReg, pluginId);\n\t\tif (existing && existing.length > 0 && !force) {\n\t\t\tthrow new Error(`Plugin \"${pluginId}\" is already installed. Use force option to reinstall.`);\n\t\t}\n\n\t\t// 4. Resolve source path.\n\t\t// marketplaceClonePath is the marketplace root — the directory containing .claude-plugin/\n\t\t// catalogPath is <marketplacesCacheDir>/<name>/marketplace.json, so the root is two levels up.\n\t\t// For local sources the content was fetched from a local path; the stored catalog is a copy\n\t\t// under marketplacesCacheDir. We need the original source root for resolving relative paths.\n\t\t// Use: path.dirname(catalogPath) is <cacheDir>/<name>/, and that IS the stored copy root,\n\t\t// so `path.resolve(mktEntry.catalogPath, \"../..\")` = parent of <name>/ inside cacheDir","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/extensibility/plugins/marketplace/manager.ts#L243-L279","documentation":"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.","triggerScenarios":"installPlugin(name, marketplace) — directly or via upgradePlugin — where the marketplace's marketplace.json catalog contains no plugin entry with the exact given name.","commonSituations":"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.","solutions":["List the plugins in the marketplace catalog to get exact names, then retry with the correct name","Check the upstream marketplace.json for renames or removals and refresh the cached catalog","Update the marketplace entry so the catalog is re-fetched from the source","Verify you are targeting the marketplace that actually publishes this plugin"],"exampleFix":"// before\nawait manager.installPlugin(\"prettier-formater\", \"community\");\n// after\nawait manager.installPlugin(\"prettier-formatter\", \"community\"); // name matches catalog.plugins[].name","handlingStrategy":"validation","validationCode":"const catalog = await manager.getMarketplaceCatalog(marketplace); // or read via #readCatalog-equivalent public API\nif (!catalog.plugins.some(p => p.name === pluginName)) {\n  throw new Error(`${pluginName} not in ${marketplace}; available: ${catalog.plugins.map(p => p.name).join(\", \")}`);\n}\nawait manager.installPlugin(pluginName, marketplace);","typeGuard":null,"tryCatchPattern":"try {\n  await manager.installPlugin(name, marketplace);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('not found in marketplace')) {\n    logger.warn(`Unknown plugin ${name}; refresh marketplace or fix name`, { name, marketplace });\n  } else throw err;\n}","preventionTips":["Copy plugin names from a marketplace list command, never from memory or display labels","Refresh/update the marketplace before installing so the cached catalog matches upstream","Grep the upstream marketplace.json when an install fails to check for upstream renames","Centralize plugin name constants so scripts don't drift from catalog names"],"tags":["plugin-marketplace","not-found","catalog"],"backgroundTag":"plugin-not-in-marketplace","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}