Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

render: --variables-file (and --variables <path>) fails with "io.readFile is not a function" since 0.8.212

クローズ 初心者向け
#6,830 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@miguel-heygen がすでに取り組んでいます。

2026年10月30日 から。

  • #6831 @miguel-heygen による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript
領域
cli

調査の方向性

render --variables-file、--variables <path>、--variables - を resolveVariablesArg と parseVariablesArg まで追い、未定義の I/O コールバックが readJsonFlagText のデフォルト値を上書きする仕組みを Issue の説明で確認してください。該当する CLI の実装とテストを読み、ファイル入力と stdin 入力に絞ったテストを実行してください。これらの入力が正常に解析され、inline JSON と --batch の動作も引き続き機能すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug triage/needs-triage
Describe the bug

hyperframes render --variables-file <file> fails before rendering on every version from 0.8.212 to 0.8.221 (latest at the time of writing). The same failure hits --variables <path> and --variables - (stdin). Inline JSON (--variables '{"title":"x"}') and --batch <file> still work.

Minimal reproduction

Any project with data-composition-variables:

echo '{}' > /tmp/vars.json
npx -y [email protected] render . --variables-file /tmp/vars.json -o /tmp/out.mp4
✗  Could not read the variables JSON
   /tmp/vars.json: io.readFile is not a function
Version --variables-file
0.8.210, 0.8.211 reads the file, render proceeds
0.8.212, 0.8.213, 0.8.216, 0.8.221 io.readFile is not a function

Linux (WSL2 Ubuntu), Node 24.19.0.

Cause (from the published dist of 0.8.221)

resolveVariablesArg(inline, filePath) calls parseVariablesArg(inline, filePath) with no readFile / readStdin, so it passes { readFile: undefined, readStdin: undefined } to readJsonFlagText:

function readJsonFlagText(value, partialIo = {}) {
  const io = { ...defaultIO, ...partialIo };   // undefined overrides the defaults
  ...
  return trimmed === "-" ? io.readStdin() : io.readFile(value);

An object spread copies keys whose value is undefined, so io.readFile is undefined.

Steps to reproduce
echo '{}' > /tmp/vars.json
npx -y [email protected] render . --variables-file /tmp/vars.json -o /tmp/out.mp4
Expected behavior

A rendered mp4 using the variables file is created

Actual behavior

◆ Rendering variables-fixture → C:\node_projects\hftemptest\out.mp4
30fps · standard · auto workers (16 cores detected)
GPU: browser GPU (auto-detect)

✗ Could not read the variables JSON

vars.json: io.readFile is not a function

Environment
The failed checks (unzip, FFmpeg, optional tools) are unrelated: the error is thrown while the flag is parsed, before any browser or encoder is touched.


hyperframes doctor
  ✓ Version          0.8.221 (latest)
  ✓ Node.js          v24.19.0 (linux x64)
  ✓ CPU              16 cores · Intel(R) Core(TM) Ultra 7 265H
  ✓ Memory           15.6 GB total · 6.0 GB available
  ✓ Disk             925.5 GB free
  ✓ Frames cache     /tmp/hyperframes-extract-cache-1000 · 925.5 GB free at /tmp · default
  ✗ Archive extractor Not found
  ✓ Settings lock    Not locked
  ✓ /dev/shm         7995 MB
  ✓ Environment      WSL · non-TTY
  ✗ whisper-cpp      Not found (optional — needed for transcription)
  ✗ TTS (Kokoro)     Not installed (optional — local voice fallback)
  ✗ BGM (MusicGen)   Not installed (optional — local music fallback)
  ✓ onnxruntime-node Not installed (installs on first use)
  ✓ @google/genai    Not installed (installs on first use)
  ✗ FFmpeg           FFmpeg is required to encode video.
  ✗ FFprobe          FFprobe is required to probe media assets.
  ✓ Chrome           cache: ~/.cache/hyperframes/chrome/chrome-headless-shell/linux-152.0.7977.30/...
  ✓ Docker           Docker version 29.6.2, build dfc4efb
  ✗ Docker running   Not running
Additional context

No response

主要言語
TypeScript
スター
54.1k
フォーク
4.9k
平均マージ
8時間 26分
マージ済み PR(30日)
790

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

heygen-com/hyperframes のほかの issue

heygen-com/hyperframes の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。