paperclipai/paperclip · error

npm install failed: ${message}

Error message

npm install failed: ${message}

What it means

Wrapped failure in the adapter install route's catch block: the underlying install error message contains npm/ERR! markers, identifying it as an npm registry/installer failure (network, auth, missing package) rather than a module-load failure; it is re-surfaced as a 500 with the npm context preserved.

Source

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

      addAdapterPlugin(record);

      logger.info(
        { type: adapterModule.type, packageName: canonicalName },
        "External adapter installed and registered",
      );

      res.status(201).json({
        type: adapterModule.type,
        packageName: canonicalName,
        version: installedVersion ?? explicitVersion,
        installedAt: record.installedAt,
        requiresRestart: isReinstall,
      });
    } catch (err) {
      const message = err instanceof Error ? err.message : String(err);
      logger.error({ err, packageName }, "Failed to install external adapter");

      // Distinguish npm errors from load errors
      if (message.includes("npm") || message.includes("ERR!")) {
        res.status(500).json({ error: `npm install failed: ${message}` });
      } else {
        res.status(500).json({ error: `Failed to install adapter: ${message}` });
      }
    }
  });

  router.get("/adapters/:type", async (req, res) => {
    assertBoardOrgAccess(req);

    const adapterType = req.params.type;
    const adapter = findServerAdapter(adapterType);
    if (!adapter) {
      res.status(404).json({ error: `Adapter "${adapterType}" is not registered.` });
      return;
    }

View on GitHub (pinned to 5716fe907e)

Solutions

  1. Read the npm error message, fix the package name/version or network issue, and retry the install.
Defensive patterns

Strategy: try-catch

When it happens

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