paperclipai/paperclip · error
Packed tarball was not created at
Error message
Packed tarball was not created at ${tarballPath} What it means
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.
Solutions
- Re-run `npm pack`/`pnpm pack` and check its output for errors; ensure the working directory is writable.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/plugins/create-paperclip-plugin/src/index.ts:111 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18).
Data as JSON: /api/errors/e2a639075342ff4c.
Report an issue: GitHub.
Appendix: source
Thrown at packages/plugins/create-paperclip-plugin/src/index.ts:111
throw new Error(`Package package.json not found at ${packageJsonPath}`);
}
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8")) as {
name?: string;
version?: string;
};
const packageName = packageJson.name ?? path.basename(packagePath);
const packageVersion = packageJson.version ?? "0.0.0";
const tarballFileName = `${packageName.replace(/^@/, "").replace("/", "-")}-${packageVersion}.tgz`;
const sdkBundleDir = path.join(outputDir, ".paperclip-sdk");
fs.mkdirSync(sdkBundleDir, { recursive: true });
execFileSync("pnpm", ["build"], { cwd: packagePath, stdio: "pipe" });
execFileSync("pnpm", ["pack", "--pack-destination", sdkBundleDir], { cwd: packagePath, stdio: "pipe" });
const tarballPath = path.join(sdkBundleDir, tarballFileName);
if (!fs.existsSync(tarballPath)) {
throw new Error(`Packed tarball was not created at ${tarballPath}`);
}
return tarballPath;
}
/**
* Generate a complete Paperclip plugin starter project.
*
* Output includes manifest/worker/UI entries, SDK harness tests, bundler presets,
* and a local dev server script for hot-reload workflow.
*/
export function scaffoldPluginProject(options: ScaffoldPluginOptions): string {
const template = options.template ?? "default";
if (!VALID_TEMPLATES.includes(template)) {
throw new Error(`Invalid template '${template}'. Expected one of: ${VALID_TEMPLATES.join(", ")}`);
}
if (!isValidPluginName(options.pluginName)) {View on GitHub (pinned to a7e689b3c3)