{"record":{"id":"bdc89d9e9d40c2aa","repo":"paperclipai/paperclip","slug":"missing-package-json-at-resolvedpackagepath","errorCode":null,"errorMessage":"Missing package.json at ${resolvedPackagePath}","messagePattern":"Missing package\\.json at (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-loader.ts","lineNumber":1270,"sourceCode":"      // Handle scoped packages\n      if (resolvedPackageName.startsWith(\"@\")) {\n        const [scope, name] = resolvedPackageName.split(\"/\");\n        resolvedPackagePath = path.join(nodeModulesPath, scope!, name!);\n      } else {\n        resolvedPackagePath = path.join(nodeModulesPath, resolvedPackageName);\n      }\n\n      if (!existsSync(resolvedPackagePath)) {\n        throw new Error(\n          `Package directory not found after installation: ${resolvedPackagePath}`,\n        );\n      }\n    }\n\n    // Step 3: Read and validate plugin manifest\n    // Note: this.loadManifest (used via current context)\n    const pkgJson = await readPackageJson(resolvedPackagePath);\n    if (!pkgJson) throw new Error(`Missing package.json at ${resolvedPackagePath}`);\n\n    if (localPath) {\n      await ensureLocalPluginBuilt(resolvedPackagePath, pkgJson);\n    }\n\n    const manifestPath = resolveManifestPath(resolvedPackagePath, pkgJson);\n    if (!manifestPath || !existsSync(manifestPath)) {\n      const manualBuildHint = localPath\n        ? formatLocalPluginManualBuildHint(resolvedPackagePath, pkgJson)\n        : \"\";\n      throw new Error(\n        `Package ${resolvedPackageName} at ${resolvedPackagePath} does not appear to be a Paperclip plugin (no manifest found).${manualBuildHint}`,\n      );\n    }\n\n    const manifest = await loadManifestFromPath(manifestPath);\n\n    // Step 4: Reject incompatible plugin API versions","sourceCodeStart":1252,"sourceCodeEnd":1288,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/plugin-loader.ts#L1252-L1288","documentation":"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.","triggerScenarios":"Thrown at server/src/services/plugin-loader.ts:1270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The resolved package directory lacks package.json. Ensure the path points to a valid npm package root, not a subdirectory or empty folder."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}