paperclipai/paperclip · error

npm install succeeded but adapter reload failed.

Error message

npm install succeeded but adapter reload failed.

What it means

Partial-failure in the reinstall route: the npm install of the adapter package succeeded, but re-importing the freshly installed module via reloadExternalAdapter failed, leaving the store record pointing at code that could not load. The route surfaces the inconsistency as an error.

Source

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

    }

    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) {
        res.status(500).json({ error: "npm install succeeded but adapter reload failed." });
        return;
      }

      unregisterServerAdapter(type);
      registerWithSessionManagement(newModule);
      configSchemaCache.delete(type);

      // Sync store version from disk
      let newVersion: string | undefined;
      const updatedRecord = getAdapterPluginByType(type);
      if (updatedRecord) {
        newVersion = readAdapterPackageVersionFromDisk(updatedRecord);
        if (newVersion) {
          addAdapterPlugin({ ...updatedRecord, version: newVersion });
        }
      }

View on GitHub (pinned to 5716fe907e)

Solutions

  1. Check the adapter load error in the server logs, fix the adapter, and reload it manually.
Defensive patterns

Strategy: try-catch

When it happens

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