{"record":{"id":"5207fe557fae0ab2","repo":"paperclipai/paperclip","slug":"adapter-adaptertype-is-not-an-externally-inst","errorCode":null,"errorMessage":"Adapter \"${adapterType}\" is not an externally installed adapter.","messagePattern":"Adapter \"(.+?)\" is not an externally installed adapter\\.","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/adapters.ts","lineNumber":548,"sourceCode":"    // currently backed by an external adapter plugin override.\n    if (BUILTIN_ADAPTER_TYPES.has(adapterType) && !getAdapterPluginByType(adapterType)) {\n      res.status(403).json({\n        error: `Cannot remove built-in adapter \"${adapterType}\".`,\n      });\n      return;\n    }\n\n    // Check that the adapter exists in the registry\n    const existing = findServerAdapter(adapterType);\n    if (!existing) {\n      res.status(404).json({\n        error: `Adapter \"${adapterType}\" is not registered.`,\n      });\n      return;\n    }\n\n    // Check that it's an external adapter\n    const externalRecord = getAdapterPluginByType(adapterType);\n    if (!externalRecord) {\n      res.status(404).json({\n        error: `Adapter \"${adapterType}\" is not an externally installed adapter.`,\n      });\n      return;\n    }\n\n    // If installed via npm (has packageName but no localPath), run npm uninstall\n    if (externalRecord.packageName && !externalRecord.localPath) {\n      try {\n        const pluginsDir = getAdapterPluginsDir();\n        await execFileAsync(\"npm\", [\"uninstall\", externalRecord.packageName], {\n          cwd: pluginsDir,\n          timeout: 60_000,\n        });\n        logger.info(\n          { type: adapterType, packageName: externalRecord.packageName },\n          \"npm uninstall completed for external adapter\",","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/server/src/routes/adapters.ts#L530-L566","documentation":"Registry lookup failure on DELETE /api/adapters/:type: an external-record lookup found the adapter in the registry but not in the external-adapter plugin store, meaning it is not an externally installed adapter and cannot be removed through this uninstall route. Returns 404.","triggerScenarios":"Thrown at server/src/routes/adapters.ts:492 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only externally installed adapters can be removed; verify the adapter type and use the correct operation."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}