heygen-com/hyperframes · error · Error

[build-zip] hyperframe runtime artifacts missing under ${cor

Error message

[build-zip] hyperframe runtime artifacts missing under ${coreDist}. Run 'bun run --filter @hyperframes/core build:hyperframes-runtime:modular' first.

What it means

The Lambda handler needs two built artifacts from @hyperframes/core: hyperframe.manifest.json and hyperframe.runtime.iife.js, both expected under packages/core/dist/. If either file is absent, the build cannot stage them and aborts with the exact build command to run.

Source

Thrown at packages/aws-lambda/scripts/build-zip.ts:336

  // Used by stageFfmpeg below; the @sparticuz/chromium + puppeteer-core
  // paths now go through npm install instead.
  let dir = packageRoot;
  for (let i = 0; i < 5; i++) {
    const candidate = join(dir, "node_modules", moduleName);
    if (existsSync(candidate)) return candidate;
    dir = dirname(dir);
  }
  throw new Error(
    `[build-zip] could not resolve ${moduleName} from ${packageRoot} — run 'bun install' first.`,
  );
}

function stageHyperframeRuntime(stagingDir: string): void {
  const coreDist = resolve(monorepoRoot, "packages/core/dist");
  const manifestSrc = join(coreDist, "hyperframe.manifest.json");
  const iifeSrc = join(coreDist, "hyperframe.runtime.iife.js");
  if (!existsSync(manifestSrc) || !existsSync(iifeSrc)) {
    throw new Error(
      `[build-zip] hyperframe runtime artifacts missing under ${coreDist}. ` +
        `Run 'bun run --filter @hyperframes/core build:hyperframes-runtime:modular' first.`,
    );
  }
  cpSync(manifestSrc, join(stagingDir, "hyperframe.manifest.json"));
  cpSync(iifeSrc, join(stagingDir, "hyperframe.runtime.iife.js"));
  console.log(`[build-zip] staged hyperframe.manifest.json + hyperframe.runtime.iife.js`);
}

// ELF header constants used by `assertLinuxX86_64Elf`. Header layout:
// bytes 0..3 magic `0x7F 'E' 'L' 'F'`, byte 4 EI_CLASS (`2` = ELFCLASS64),
// bytes 18..19 e_machine little-endian (`0x3E` = EM_X86_64).
const ELF_MAGIC = Buffer.from([0x7f, 0x45, 0x4c, 0x46]);
const ELF_CLASS_64 = 2;
const ELF_MACHINE_X86_64 = 0x3e;
const ELF_HEADER_BYTES = 20;

/**

View on GitHub (pinned to c2996c8626)

Solutions

  1. Run 'bun run --filter @hyperframes/core build:hyperframes-runtime:modular'.
  2. Or run the full 'bun run build' at the monorepo root.
  3. Verify both files exist: ls packages/core/dist/hyperframe.manifest.json packages/core/dist/hyperframe.runtime.iife.js.
Defensive patterns

Strategy: validation

Validate before calling

import { existsSync } from "node:fs";
import { resolve } from "node:path";
const coreDist = resolve(monorepoRoot, "packages/core/dist");
const manifest = `${coreDist}/hyperframe.manifest.json`;
const iife = `${coreDist}/hyperframe.runtime.iife.js`;
if (!existsSync(manifest) || !existsSync(iife)) {
  console.error("Hyperframe runtime artifacts missing. Run: bun run --filter @hyperframes/core build:hyperframes-runtime:modular");
  process.exit(1);
}

Prevention

When it happens

Trigger: The core package has not been built, or was built with a target that does not emit the IIFE runtime bundle. Both files must exist in packages/core/dist/ before build-zip runs.

Common situations: Fresh checkout where bun run build was not executed; a partial build that compiled TypeScript but not the runtime bundle; running build-zip.ts directly without the preceding monorepo build step.

Related errors


AI-assisted analysis of heygen-com/hyperframes@c2996c8626 (2026-08-12). Data as JSON: /api/errors/8f2fb241c7a6fdc3. Report an issue: GitHub.