paperclipai/paperclip · error

Local-path adapters cannot be reinstalled. Use Reload instea

Error message

Local-path adapters cannot be reinstalled. Use Reload instead.

What it means

Source guard on the reinstall route: the adapter's store record shows it was installed from a local path (localPath set), so there is no npm package to re-pull; the route tells the caller to use the reload endpoint instead and returns 400.

Source

Thrown at server/src/routes/adapters.ts:665

  // 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();

      logger.info({ type, packageName: record.packageName }, "Reinstalling adapter package via npm");

      await execFileAsync("npm", ["install", "--no-save", record.packageName], {
        cwd: pluginsDir,
        timeout: 120_000,
      });

      // Reload the freshly installed adapter
      const newModule = await reloadExternalAdapter(type);
      if (!newModule) {

View on GitHub (pinned to 5716fe907e)

Solutions

  1. Use the Reload operation for local-path adapters instead of reinstall.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/adapters.ts:607 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/4d079f300c7988cc. Report an issue: GitHub.