paperclipai/paperclip · error

Missing package.json at ${resolvedPackagePath}

Error message

Missing package.json at ${resolvedPackagePath}

What it means

Package integrity guard: the package directory exists but contains no package.json, so it is not a valid npm package and cannot be inspected for a manifest; the corrupted/incomplete package is at fault.

Source

Thrown at server/src/services/plugin-loader.ts:1270

      // Handle scoped packages
      if (resolvedPackageName.startsWith("@")) {
        const [scope, name] = resolvedPackageName.split("/");
        resolvedPackagePath = path.join(nodeModulesPath, scope!, name!);
      } else {
        resolvedPackagePath = path.join(nodeModulesPath, resolvedPackageName);
      }

      if (!existsSync(resolvedPackagePath)) {
        throw new Error(
          `Package directory not found after installation: ${resolvedPackagePath}`,
        );
      }
    }

    // Step 3: Read and validate plugin manifest
    // Note: this.loadManifest (used via current context)
    const pkgJson = await readPackageJson(resolvedPackagePath);
    if (!pkgJson) throw new Error(`Missing package.json at ${resolvedPackagePath}`);

    if (localPath) {
      await ensureLocalPluginBuilt(resolvedPackagePath, pkgJson);
    }

    const manifestPath = resolveManifestPath(resolvedPackagePath, pkgJson);
    if (!manifestPath || !existsSync(manifestPath)) {
      const manualBuildHint = localPath
        ? formatLocalPluginManualBuildHint(resolvedPackagePath, pkgJson)
        : "";
      throw new Error(
        `Package ${resolvedPackageName} at ${resolvedPackagePath} does not appear to be a Paperclip plugin (no manifest found).${manualBuildHint}`,
      );
    }

    const manifest = await loadManifestFromPath(manifestPath);

    // Step 4: Reject incompatible plugin API versions

View on GitHub (pinned to 120ae5428f)

Solutions

  1. The resolved package directory lacks package.json. Ensure the path points to a valid npm package root, not a subdirectory or empty folder.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/plugin-loader.ts:1270 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/bdc89d9e9d40c2aa. Report an issue: GitHub.