render: --variables-file (and --variables <path>) fails with "io.readFile is not a function" since 0.8.212
維護者通常 1 天內回覆
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 76/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
- 領域
- cli
研究方向
追蹤 render --variables-file、--variables <path> 和 --variables -,直到 resolveVariablesArg 和 parseVariablesArg;Issue 指出未定義的 I/O 回呼如何覆蓋 readJsonFlagText 中的預設值。閱讀相關的 CLI 實作及其測試,然後針對檔案和 stdin 輸入執行專項測試。當這些輸入能成功解析,且 inline JSON 和 --batch 的行為仍正常運作時,工作即告完成。
由索引模型根據 Issue 內容生成。
描述
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 分鐘
- 30 天內合併 PR
- 790
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
heygen-com/hyperframes 的其他 Issue
-
bug triage/ready
難度 2/5 1-3 小時 新手友好度 82/100
heygen-com/hyperframes#6849 · 1 則留言 ·
維護者通常 1 天內回覆
-
Segmented capture always fails with `--format mov`可能已有人在做 @DaKaufeeBoii 今天認領。 未關閉bug difficulty/easy triage/ready
難度 2/5 1-3 小時 新手友好度 78/100
heygen-com/hyperframes#6481 · 2 則留言 ·
維護者通常 1 天內回覆
-
Timeline: show a clip's full name when its label is cut off可能已有人在做 @DanielMcSheehy 於 13 天前認領。 未關閉desktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
難度 2/5 1-3 小時 新手友好度 85/100
heygen-com/hyperframes#5582 · 2 則留言 ·
維護者通常 1 天內回覆
-
Studio: press ? to open the keyboard shortcuts panel可能已有人在做 @B-Payal 於 17 天前認領。 未關閉desktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
難度 2/5 1-3 小時 新手友好度 82/100
heygen-com/hyperframes#5580 · 1 則留言 ·
維護者通常 1 天內回覆
-
lint: add tests for three caption rules that have none可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉difficulty/easy enhancement help wanted triage/ready
難度 2/5 1-3 小時 新手友好度 85/100
heygen-com/hyperframes#5388 · 1 則留言 ·
維護者通常 1 天內回覆
查看 heygen-com/hyperframes 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 86/100
excaliburjs/Excalibur#3895 ·
維護者通常 3 天內回覆
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejected可能已有人在做 @Steve-20-ai 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestamp可能已有人在做 @Gurkaran18 今天認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 75/100
joinmarket-webui/jam#1588 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
mihaip/infinite-mac#475 ·