{"record":{"id":"44dd962c29867ad5","repo":"can1357/oh-my-pi","slug":"plugin-pluginid-is-not-installed","errorCode":null,"errorMessage":"Plugin \"${pluginId}\" is not installed","messagePattern":"Plugin \"(.+?)\" is not installed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/extensibility/plugins/marketplace/manager.ts","lineNumber":457,"sourceCode":"\t\t\treturn entry.source.sha.slice(0, 7);\n\t\t}\n\n\t\treturn \"0.0.0\";\n\t}\n\n\t/** Validates and removes a marketplace plugin, or only validates when `dryRun` is set. */\n\tasync uninstallPlugin(pluginId: string, scope?: \"user\" | \"project\", options?: { dryRun?: boolean }): Promise<void> {\n\t\tconst parsed = parsePluginId(pluginId);\n\t\tif (!parsed) {\n\t\t\tthrow new Error(`Invalid plugin ID format: \"${pluginId}\". Expected \"name@marketplace\".`);\n\t\t}\n\n\t\tconst { userEntries, projectEntries, userReg, projectReg } = await this.#findInBothRegistries(pluginId);\n\t\tconst inUser = userEntries && userEntries.length > 0;\n\t\tconst inProject = projectEntries && projectEntries.length > 0;\n\n\t\tif (!inUser && !inProject) {\n\t\t\tthrow new Error(`Plugin \"${pluginId}\" is not installed`);\n\t\t}\n\n\t\t// Disambiguation: if installed in both scopes and no explicit scope, require one.\n\t\tlet targetScope: \"user\" | \"project\";\n\t\tif (inUser && inProject) {\n\t\t\tif (!scope) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Plugin \"${pluginId}\" is installed in both user and project scope. Use --scope user or --scope project to specify which to remove.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\ttargetScope = scope;\n\t\t} else if (inProject) {\n\t\t\tif (scope === \"user\") {\n\t\t\t\tthrow new Error(`Plugin \"${pluginId}\" is not installed in user scope`);\n\t\t\t}\n\t\t\ttargetScope = \"project\";\n\t\t} else {\n\t\t\tif (scope === \"project\") {","sourceCodeStart":439,"sourceCodeEnd":475,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/extensibility/plugins/marketplace/manager.ts#L439-L475","documentation":"After validating the id format, uninstallPlugin checks both user and project installed-plugin registries via #findInBothRegistries. If the plugin id has no entries in either scope, there is nothing to remove and it throws this error.","triggerScenarios":"uninstallPlugin(\"name@marketplace\") where neither the user-scope nor project-scope registry contains that id — plugin never installed, already uninstalled, wrong marketplace suffix, or wrong working directory (project registry is project-scoped).","commonSituations":"Uninstalling from a different project directory than the one where the plugin was project-installed; double-uninstall after the first succeeded; marketplace suffix mismatch (installed from \"acme\" but uninstalling \"name@other\").","solutions":["Verify the exact installed id via the plugin list for both scopes, then retry","Run from the correct project directory if the plugin was installed in project scope","If already uninstalled, no action needed — treat this as success in idempotent scripts","Check that the @marketplace part matches where the plugin was installed from"],"exampleFix":"// before\nawait manager.uninstallPlugin(\"formatter@old-marketplace\");\n// after\nawait manager.uninstallPlugin(\"formatter@community\"); // id confirmed via installed-plugins list","handlingStrategy":"validation","validationCode":"const installed = await manager.listInstalledPlugins(); // both scopes\nconst target = `${name}@${marketplace}`;\nif (!installed.some(p => p.id === target)) {\n  console.log(`${target} is not installed; nothing to do`);\n  return;\n}\nawait manager.uninstallPlugin(target);","typeGuard":null,"tryCatchPattern":"try {\n  await manager.uninstallPlugin(pluginId);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"is not installed\")) {\n    // idempotent uninstall: already gone, treat as success\n  } else throw err;\n}","preventionTips":["Write uninstalls as idempotent: catch \"not installed\" and exit 0","Confirm the exact id with a list command before uninstalling","Run uninstall commands from the project directory that owns a project-scope install","Match the @marketplace suffix to the source marketplace used at install time"],"tags":["plugin-marketplace","not-found","uninstall"],"backgroundTag":"plugin-not-installed","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}