paperclipai/paperclip · error
Cannot reinstall built-in adapter.
Error message
Cannot reinstall built-in adapter.
What it means
Type guard on POST /api/adapters/:type/reinstall: the target is a builtin adapter type with no external override, and builtins cannot be reinstalled from npm, so the route returns 400 before running npm install.
Source
Thrown at server/src/routes/adapters.ts:654
const message = err instanceof Error ? err.message : String(err);
logger.error({ err, type }, "Failed to reload external adapter");
res.status(500).json({ error: `Failed to reload adapter: ${message}` });
}
});
// ── POST /api/adapters/:type/reinstall ──────────────────────────────────
// Reinstall an npm-sourced external adapter (pulls latest from registry).
// Local-path adapters cannot be reinstalled — use Reload instead.
//
// This is a convenience shortcut for remove + install with the same
// package name, but without the risk of losing the store record.
router.post("/adapters/:type/reinstall", async (req, res) => {
assertInstanceAdmin(req);
assertAdapterCodeInstallAllowed();
assertAdapterManagementVisible();
const type = req.params.type;
if (BUILTIN_ADAPTER_TYPES.has(type) && !getAdapterPluginByType(type)) {
res.status(400).json({ error: "Cannot reinstall built-in adapter." });
return;
}
const record = getAdapterPluginByType(type);
if (!record) {
res.status(404).json({ error: `Adapter "${type}" is not an externally installed adapter.` });
return;
}
if (record.localPath) {
res.status(400).json({ error: "Local-path adapters cannot be reinstalled. Use Reload instead." });
return;
}
try {
const pluginsDir = getAdapterPluginsDir();View on GitHub (pinned to 5716fe907e)
Solutions
- Built-in adapters cannot be reinstalled; update the app version to update builtin adapters.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/routes/adapters.ts:596 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-08-18).
Data as JSON: /api/errors/187e80306f661c53.
Report an issue: GitHub.