{"record":{"id":"43810274a12844d1","repo":"paperclipai/paperclip","slug":"could-not-read-managed-install-manifest-at-paths","errorCode":null,"errorMessage":"Could not read managed install manifest at ${paths.manifestPath}: ${String(error)}","messagePattern":"Could not read managed install manifest at (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/install-store.ts","lineNumber":229,"sourceCode":"  }\n  return path.join(paths.installsRoot, source, identifier);\n}\n\nexport function readInstallManifest(paths = resolveInstallStorePaths()): InstallManifest | null {\n  try {\n    const value = JSON.parse(fs.readFileSync(paths.manifestPath, \"utf8\")) as InstallManifest;\n    if (\n      value.schemaVersion !== INSTALL_MANIFEST_VERSION ||\n      (value.source !== \"npm\" && value.source !== \"git\") ||\n      !Array.isArray(value.previous) ||\n      typeof value.payloadPath !== \"string\"\n    ) {\n      throw new Error(\"unsupported manifest shape\");\n    }\n    return value;\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return null;\n    throw new Error(`Could not read managed install manifest at ${paths.manifestPath}: ${String(error)}`);\n  }\n}\n\nexport function writeInstallManifestAtomic(\n  manifest: InstallManifest,\n  paths = resolveInstallStorePaths(),\n): void {\n  ensurePrivateDirectory(paths.cliRoot);\n  const temporaryPath = `${paths.manifestPath}.tmp-${process.pid}-${Date.now()}`;\n  try {\n    fs.writeFileSync(temporaryPath, `${JSON.stringify(manifest, null, 2)}\\n`, { mode: 0o600 });\n    fs.renameSync(temporaryPath, paths.manifestPath);\n  } finally {\n    fs.rmSync(temporaryPath, { force: true });\n  }\n}\n\nfunction assertPayloadPath(payloadPath: string, paths: InstallStorePaths): void {","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/install-store.ts#L211-L247","documentation":"readInstallManifest could not read or parse install.json (missing, invalid JSON, or unsupported shape) and the underlying error is wrapped with the manifest path; callers treat this as no manifest.","triggerScenarios":"Thrown at cli/src/install-store.ts:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions and contents of ${paths.manifestPath} and retry.","Re-install the payload so a readable manifest is written."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}