{"record":{"id":"e2a639075342ff4c","repo":"paperclipai/paperclip","slug":"packed-tarball-was-not-created-at-tarballpath","errorCode":null,"errorMessage":"Packed tarball was not created at ${tarballPath}","messagePattern":"Packed tarball was not created at (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/create-paperclip-plugin/src/index.ts","lineNumber":111,"sourceCode":"    throw new Error(`Package package.json not found at ${packageJsonPath}`);\n  }\n\n  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\")) as {\n    name?: string;\n    version?: string;\n  };\n  const packageName = packageJson.name ?? path.basename(packagePath);\n  const packageVersion = packageJson.version ?? \"0.0.0\";\n  const tarballFileName = `${packageName.replace(/^@/, \"\").replace(\"/\", \"-\")}-${packageVersion}.tgz`;\n  const sdkBundleDir = path.join(outputDir, \".paperclip-sdk\");\n\n  fs.mkdirSync(sdkBundleDir, { recursive: true });\n  execFileSync(\"pnpm\", [\"build\"], { cwd: packagePath, stdio: \"pipe\" });\n  execFileSync(\"pnpm\", [\"pack\", \"--pack-destination\", sdkBundleDir], { cwd: packagePath, stdio: \"pipe\" });\n\n  const tarballPath = path.join(sdkBundleDir, tarballFileName);\n  if (!fs.existsSync(tarballPath)) {\n    throw new Error(`Packed tarball was not created at ${tarballPath}`);\n  }\n\n  return tarballPath;\n}\n\n/**\n * Generate a complete Paperclip plugin starter project.\n *\n * Output includes manifest/worker/UI entries, SDK harness tests, bundler presets,\n * and a local dev server script for hot-reload workflow.\n */\nexport function scaffoldPluginProject(options: ScaffoldPluginOptions): string {\n  const template = options.template ?? \"default\";\n  if (!VALID_TEMPLATES.includes(template)) {\n    throw new Error(`Invalid template '${template}'. Expected one of: ${VALID_TEMPLATES.join(\", \")}`);\n  }\n\n  if (!isValidPluginName(options.pluginName)) {","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/packages/plugins/create-paperclip-plugin/src/index.ts#L93-L129","documentation":"Post-condition check in packLocalPackage: `pnpm build`/pack ran in the package directory but the expected .tgz tarball (name-version.tgz derived from package.json) is not present in the .paperclip-sdk output dir afterwards. Indicates the build or pack step silently failed, packed under a different name/version, or wrote to an unexpected location.","triggerScenarios":"Thrown at packages/plugins/create-paperclip-plugin/src/index.ts:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run `npm pack`/`pnpm pack` and check its output for errors; ensure the working directory is writable."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}