paperclipai/paperclip · error · Error
Managed install metadata is missing.
Error message
Managed install metadata is missing.
What it means
updateCommand is in managed mode but readInstallManifest returned null, so the managed install's metadata is absent and no update can be planned.
Solutions
- Reinstall the managed payload to regenerate install metadata.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/update.ts:244 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/2c77a31a36ae117d.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/update.ts:247
try {
fs.writeFileSync(npmUserConfigPath, `registry=${PUBLIC_NPM_REGISTRY}\n@paperclipai:registry=${PUBLIC_NPM_REGISTRY}\n`, { mode: 0o600 });
await runCommand("npm", args, {
env: {
...process.env,
npm_config_registry: PUBLIC_NPM_REGISTRY,
NPM_CONFIG_REGISTRY: PUBLIC_NPM_REGISTRY,
npm_config_userconfig: npmUserConfigPath,
NPM_CONFIG_USERCONFIG: npmUserConfigPath,
},
maxBuffer: 16 * 1024 * 1024,
});
} finally {
fs.rmSync(npmConfigDir, { recursive: true, force: true });
}
}
emit(options, { mode, action: "update", targetVersion, dryRun: Boolean(options.dryRun), command: ["npm", ...args] }, options.dryRun ? "Dry run complete." : pc.green(`Updated global npm install to ${targetVersion}.`)); return;
}
if (!manifest) throw new Error("Managed install metadata is missing.");
if (comparison === 0) { emit(options, { mode, currentVersion, targetVersion, changed: false }, `paperclipai ${targetVersion} is already active.`); return; }
if (comparison < 0 && options.yes !== true) { const confirmed = await (overrides.confirm ?? defaultConfirm)(`Downgrade paperclipai from ${currentVersion} to ${targetVersion}?`); if (!confirmed) throw new Error("Downgrade cancelled. Re-run with --yes to confirm explicitly."); }
if (options.dryRun) { emit(options, { mode, currentVersion, targetVersion, action: comparison < 0 ? "downgrade" : "update", backup: options.backup !== false, dryRun: true }, `Would ${comparison < 0 ? "downgrade" : "update"} paperclipai ${currentVersion} → ${targetVersion}${options.backup === false ? " without a backup" : " after a database backup"}.`); return; }
if (options.backup !== false) await runPreUpdateBackup(options, overrides.backup ?? (() => dbBackupCommand({})), overrides.hasInstanceData);
const installed = await withInstallStoreLock(async () => {
assertManagedShimWritable(paths);
const payload = await installNpmPayload(targetVersion, runCommand, paths);
writeManagedShim(paths);
const record: InstallRecord = { source: "npm", version: targetVersion, channel: request.channel, payloadPath: payload.payloadPath, installedAt: (overrides.now?.() ?? new Date()).toISOString() };
const next = buildNextManifest(record, manifest); const oldTarget = fs.readlinkSync(paths.currentPath); flipCurrentAtomic(payload.payloadPath, paths);
try { writeInstallManifestAtomic(next, paths); } catch (error) { flipCurrentAtomic(path.resolve(paths.cliRoot, oldTarget), paths); throw error; }
pruneInstallPayloads(next, paths); return payload;
}, paths);
let restarted: boolean;
try {
restarted = await (overrides.restartActiveService ?? restartActiveManagedService)(targetVersion);
} catch (error) {
return rollbackAfterServiceValidationFailure(View on GitHub (pinned to 01ad858492)