heygen-com/hyperframes · critical · Error

Dockerfile.render not found — CLI package may be corrupted

Error message

Dockerfile.render not found — CLI package may be corrupted

What it means

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.

Source

Thrown at packages/cli/src/commands/render.ts:538

function dockerImageTag(version: string): string {
  return `${DOCKER_IMAGE_PREFIX}:${version}`;
}

function resolveDockerfilePath(): string {
  // Built CLI: dist/docker/Dockerfile.render
  const builtPath = resolve(__dirname, "docker", "Dockerfile.render");
  // Dev mode: src/docker/Dockerfile.render
  const devPath = resolve(__dirname, "..", "src", "docker", "Dockerfile.render");
  for (const p of [builtPath, devPath]) {
    try {
      statSync(p);
      return p;
    } catch {
      continue;
    }
  }
  throw new Error("Dockerfile.render not found — CLI package may be corrupted");
}

function dockerImageExists(tag: string): boolean {
  try {
    execFileSync("docker", ["image", "inspect", tag], { stdio: "pipe", timeout: 10_000 });
    return true;
  } catch {
    return false;
  }
}

function dockerImageTagForPlatform(version: string, platform: string): string {
  // Suffix the tag with the arch so amd64 and arm64 images of the same
  // hyperframes version coexist in the local cache (a developer who flips
  // between hosts shouldn't have to rebuild).
  const archSuffix = platform === "linux/arm64" ? "-arm64" : "";
  return `${dockerImageTag(version)}${archSuffix}`;
}

View on GitHub (pinned to c2996c8626)

Solutions

  1. Reinstall the CLI cleanly: `npm i -g hyperframes@latest` (or `npx hyperframes@latest`)
  2. If running from source, build first: `bun run build` so dist/docker/Dockerfile.render is emitted
  3. Verify the asset exists: list dist/docker and src/docker under the CLI package
  4. Render locally without Docker (`hyperframes render`) as a workaround
Defensive patterns

Strategy: validation

Validate before calling

import { existsSync } from "node:fs";
import { dirname, join } from "node:path";
function dockerfilePresent(): boolean {
  const here = dirname(require.resolve("hyperframes/package.json"));
  return existsSync(join(here, "dist", "docker", "Dockerfile.render")) ||
         existsSync(join(here, "src", "docker", "Dockerfile.render"));
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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