{"record":{"id":"d1ff3f3d495e5259","repo":"heygen-com/hyperframes","slug":"dockerfile-render-not-found-cli-package-may-be-c","errorCode":null,"errorMessage":"Dockerfile.render not found — CLI package may be corrupted","messagePattern":"Dockerfile\\.render not found — CLI package may be corrupted","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/cli/src/commands/render.ts","lineNumber":538,"sourceCode":"\nfunction dockerImageTag(version: string): string {\n  return `${DOCKER_IMAGE_PREFIX}:${version}`;\n}\n\nfunction resolveDockerfilePath(): string {\n  // Built CLI: dist/docker/Dockerfile.render\n  const builtPath = resolve(__dirname, \"docker\", \"Dockerfile.render\");\n  // Dev mode: src/docker/Dockerfile.render\n  const devPath = resolve(__dirname, \"..\", \"src\", \"docker\", \"Dockerfile.render\");\n  for (const p of [builtPath, devPath]) {\n    try {\n      statSync(p);\n      return p;\n    } catch {\n      continue;\n    }\n  }\n  throw new Error(\"Dockerfile.render not found — CLI package may be corrupted\");\n}\n\nfunction dockerImageExists(tag: string): boolean {\n  try {\n    execFileSync(\"docker\", [\"image\", \"inspect\", tag], { stdio: \"pipe\", timeout: 10_000 });\n    return true;\n  } catch {\n    return false;\n  }\n}\n\nfunction dockerImageTagForPlatform(version: string, platform: string): string {\n  // Suffix the tag with the arch so amd64 and arm64 images of the same\n  // hyperframes version coexist in the local cache (a developer who flips\n  // between hosts shouldn't have to rebuild).\n  const archSuffix = platform === \"linux/arm64\" ? \"-arm64\" : \"\";\n  return `${dockerImageTag(version)}${archSuffix}`;\n}","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/cli/src/commands/render.ts#L520-L556","documentation":"Thrown by the Docker render path when neither the built Dockerfile (dist/docker/Dockerfile.render) nor the dev-mode Dockerfile (src/docker/Dockerfile.render) can be statSynced. Both candidate paths are derived from __dirname; their absence means the CLI package was installed/packaged incompletely.","triggerScenarios":"Running `hyperframes render --docker` (or the orchestrator's docker route) on a CLI install where the Dockerfile asset was stripped. statSync throws for both builtPath and devPath, so the loop falls through to the throw at render.ts:538.","commonSituations":"A repackaged/forked CLI that did not include the docker assets; an over-aggressive package prune step; a partial/corrupted npm install; running from a source tree where the dist build was never run and the src layout differs.","solutions":["Reinstall the CLI cleanly: `npm i -g hyperframes@latest` (or `npx hyperframes@latest`)","If running from source, build first: `bun run build` so dist/docker/Dockerfile.render is emitted","Verify the asset exists: list dist/docker and src/docker under the CLI package","Render locally without Docker (`hyperframes render`) as a workaround"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { existsSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nfunction dockerfilePresent(): boolean {\n  const here = dirname(require.resolve(\"hyperframes/package.json\"));\n  return existsSync(join(here, \"dist\", \"docker\", \"Dockerfile.render\")) ||\n         existsSync(join(here, \"src\", \"docker\", \"Dockerfile.render\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install the CLI from the official npm tarball rather than a fork","Build from source (`bun run build`) before exercising the docker render path","Verify dist/docker assets exist after install"],"tags":["render","docker","packaging","corrupted-install"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}