{"record":{"id":"8f2fb241c7a6fdc3","repo":"heygen-com/hyperframes","slug":"build-zip-hyperframe-runtime-artifacts-missing-u","errorCode":null,"errorMessage":"[build-zip] hyperframe runtime artifacts missing under ${coreDist}. Run 'bun run --filter @hyperframes/core build:hyperframes-runtime:modular' first.","messagePattern":"\\[build-zip\\] hyperframe runtime artifacts missing under (.+?)\\. Run 'bun run --filter @hyperframes/core build:hyperframes-runtime:modular' first\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/aws-lambda/scripts/build-zip.ts","lineNumber":336,"sourceCode":"  // Used by stageFfmpeg below; the @sparticuz/chromium + puppeteer-core\n  // paths now go through npm install instead.\n  let dir = packageRoot;\n  for (let i = 0; i < 5; i++) {\n    const candidate = join(dir, \"node_modules\", moduleName);\n    if (existsSync(candidate)) return candidate;\n    dir = dirname(dir);\n  }\n  throw new Error(\n    `[build-zip] could not resolve ${moduleName} from ${packageRoot} — run 'bun install' first.`,\n  );\n}\n\nfunction stageHyperframeRuntime(stagingDir: string): void {\n  const coreDist = resolve(monorepoRoot, \"packages/core/dist\");\n  const manifestSrc = join(coreDist, \"hyperframe.manifest.json\");\n  const iifeSrc = join(coreDist, \"hyperframe.runtime.iife.js\");\n  if (!existsSync(manifestSrc) || !existsSync(iifeSrc)) {\n    throw new Error(\n      `[build-zip] hyperframe runtime artifacts missing under ${coreDist}. ` +\n        `Run 'bun run --filter @hyperframes/core build:hyperframes-runtime:modular' first.`,\n    );\n  }\n  cpSync(manifestSrc, join(stagingDir, \"hyperframe.manifest.json\"));\n  cpSync(iifeSrc, join(stagingDir, \"hyperframe.runtime.iife.js\"));\n  console.log(`[build-zip] staged hyperframe.manifest.json + hyperframe.runtime.iife.js`);\n}\n\n// ELF header constants used by `assertLinuxX86_64Elf`. Header layout:\n// bytes 0..3 magic `0x7F 'E' 'L' 'F'`, byte 4 EI_CLASS (`2` = ELFCLASS64),\n// bytes 18..19 e_machine little-endian (`0x3E` = EM_X86_64).\nconst ELF_MAGIC = Buffer.from([0x7f, 0x45, 0x4c, 0x46]);\nconst ELF_CLASS_64 = 2;\nconst ELF_MACHINE_X86_64 = 0x3e;\nconst ELF_HEADER_BYTES = 20;\n\n/**","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/aws-lambda/scripts/build-zip.ts#L318-L354","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Run 'bun run --filter @hyperframes/core build:hyperframes-runtime:modular'.","Or run the full 'bun run build' at the monorepo root.","Verify both files exist: ls packages/core/dist/hyperframe.manifest.json packages/core/dist/hyperframe.runtime.iife.js."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { existsSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nconst coreDist = resolve(monorepoRoot, \"packages/core/dist\");\nconst manifest = `${coreDist}/hyperframe.manifest.json`;\nconst iife = `${coreDist}/hyperframe.runtime.iife.js`;\nif (!existsSync(manifest) || !existsSync(iife)) {\n  console.error(\"Hyperframe runtime artifacts missing. Run: bun run --filter @hyperframes/core build:hyperframes-runtime:modular\");\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run the full monorepo build (bun run build) before build-zip.","Add a pre-build check for the two runtime artifacts in CI.","Document the build dependency order in the CI pipeline."],"tags":["build","hyperframes-runtime","monorepo"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}