paperclipai/paperclip · error · Error

Git install cannot stage workspace dependency ${packageName}

Error message

Git install cannot stage workspace dependency ${packageName}; it is missing from scripts/release-package-manifest.json.

What it means

Thrown by resolveGitInstallWorkspacePackages (install.ts:67) when a @paperclipai/* dependency referenced from another package's dependencies is not present in scripts/release-package-manifest.json. The git installer stages only packages declared in that manifest; an undeclared workspace dep cannot be staged.

Source

Thrown at cli/src/commands/install.ts:67

      : "";
    if (!stderr || (error instanceof Error && error.message.includes(stderr))) throw error;
    throw new Error(`${error instanceof Error ? error.message : String(error)}\n${stderr}`, { cause: error });
  }
}

export function resolveGitInstallWorkspacePackages(checkoutPath: string): ReleasePackageEntry[] {
  const manifestPath = path.join(checkoutPath, "scripts", "release-package-manifest.json");
  const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8")) as ReleasePackageEntry[];
  const packageByName = new Map(manifest.map((entry) => [entry.name, entry]));
  const visiting = new Set<string>();
  const visited = new Set<string>();
  const ordered: ReleasePackageEntry[] = [];

  const visit = (packageName: string): void => {
    if (visited.has(packageName)) return;
    if (visiting.has(packageName)) throw new Error(`Circular workspace dependency while staging ${packageName}.`);
    const entry = packageByName.get(packageName);
    if (!entry) throw new Error(`Git install cannot stage workspace dependency ${packageName}; it is missing from scripts/release-package-manifest.json.`);
    visiting.add(packageName);
    const packageJson = JSON.parse(fs.readFileSync(path.join(checkoutPath, entry.dir, "package.json"), "utf8")) as Record<string, unknown>;
    for (const section of ["dependencies", "optionalDependencies", "peerDependencies"] as const) {
      const dependencies = packageJson[section];
      if (!dependencies || typeof dependencies !== "object") continue;
      for (const dependencyName of Object.keys(dependencies)) {
        if (dependencyName.startsWith("@paperclipai/")) visit(dependencyName);
      }
    }
    visiting.delete(packageName);
    visited.add(packageName);
    ordered.push(entry);
  };

  visit("@paperclipai/server");
  return ordered;
}

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. Add the missing package entry (dir + name) to scripts/release-package-manifest.json.
  2. Confirm the dir matches the package's actual location in the workspace.
  3. Re-run the git install.

Example fix

// before: manifest missing @paperclipai/newpkg
// after: add to scripts/release-package-manifest.json
{ "dir": "packages/newpkg", "name": "@paperclipai/newpkg" }
Defensive patterns

Strategy: validation

Validate before calling

function assertManifestCoversDeps(manifest: ReleasePackageEntry[], checkoutPath: string): void {
  const names = new Set(manifest.map((e) => e.name));
  for (const entry of manifest) {
    const pkg = JSON.parse(fs.readFileSync(path.join(checkoutPath, entry.dir, 'package.json'), 'utf8'));
    for (const section of ['dependencies', 'optionalDependencies', 'peerDependencies']) {
      const deps = pkg[section] || {};
      for (const dep of Object.keys(deps)) {
        if (dep.startsWith('@paperclipai/') && !names.has(dep)) {
          throw new Error(`${dep} is referenced by ${entry.name} but missing from the release manifest.`);
        }
      }
    }
  }
}

Try / catch

try {
  const ordered = resolveGitInstallWorkspacePackages(checkoutPath);
} catch (err) {
  if (err instanceof Error && err.message.includes('missing from scripts/release-package-manifest.json')) {
    console.error('A @paperclipai dep is not in the release manifest; add it and retry.');
  }
  throw err;
}

Prevention

When it happens

Trigger: Adding a new @paperclipai package and depending on it from another package without registering it in scripts/release-package-manifest.json, or renaming a package without updating the manifest.

Common situations: New package added during feature work but the release manifest was not updated; manifest drifted from the actual workspace layout.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/92efdcd6efff9aae. Report an issue: GitHub.