render: --variables-file (and --variables <path>) fails with "io.readFile is not a function" since 0.8.212
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Theo dõi render --variables-file, --variables <path> và --variables - đến resolveVariablesArg và parseVariablesArg; issue xác định cách các callback I/O chưa được định nghĩa ghi đè giá trị mặc định trong readJsonFlagText. Đọc phần triển khai CLI liên quan và các bài kiểm thử của nó, sau đó chạy các bài kiểm thử tập trung cho đầu vào từ tệp và stdin. Hoàn tất khi các đầu vào đó được phân tích thành công, đồng thời hành vi của inline JSON và --batch vẫn hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 54.1k
- Fork
- 4.9k
- Merge trung bình
- 8 giờ 46 phút
- Pull request đã merge (30 ngày)
- 781
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của heygen-com/hyperframes
-
`motionContextToDocs`: `y` track copies `opacity` when a node animates both (key lookup has no word boundary)Có thể đã có người làm @Muzzy5150 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
heygen-com/hyperframes#6756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Batch rendering rejects JSON files saved with a byte order markCó thể đã có người làm @AksharP5 đã nhận 2 ngày trước. Đang mởbug triage/ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
heygen-com/hyperframes#6604 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug difficulty/easy triage/ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
heygen-com/hyperframes#6481 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Timeline: show a clip's full name when its label is cut offCó thể đã có người làm @DanielMcSheehy đã nhận 12 ngày trước. Đang mởdesktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
heygen-com/hyperframes#5582 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Studio: press ? to open the keyboard shortcuts panelCó thể đã có người làm @B-Payal đã nhận 16 ngày trước. Đang mởdesktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
heygen-com/hyperframes#5580 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của heygen-com/hyperframes
Issue tương tự
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Export the Hemi Earn Router address and the Router and Agent ABIs from `@vetro-protocol/earn`Đang mởhemi-earn
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vetro-protocol/vetro-monorepo#1043 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stage 2: bare names resolve against PATH differently from the shell (empty and relative entries)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
STRML/omp-classifier#206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
atlassian-labs/mermaid-diagrams-viewer#188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dashboard enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Olanetsoft/agent-lookout#225 ·
Maintainer thường phản hồi trong vòng 1 ngày