Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

inspector: build.mjs resolves paths with URL#pathname, fails ENOENT (F:\\F:\\...) and aborts bun run build on Windows

Đang mở Phù hợp với người mới
#5,863 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Đọc packages/inspector/build.mjs và so sánh helper đường dẫn của nó với các ví dụ trong repository được nêu trong issue. Tái hiện lỗi bằng bun run build trên Windows, sau đó xác nhận package build thành công sau khi helper sử dụng fileURLToPath. Công việc hoàn tất khi tiền tố ổ đĩa bị lặp đã biến mất và root build có thể tiếp tục vượt qua package inspector.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

bun run build fails on Windows in the new @hyperframes/inspector package:

@hyperframes/inspector build $ node build.mjs
Error: ENOENT: no such file or directory, open
  'F:\F:\PINOKIO\Run\PINOKIO\api\HyperFrames-Studio.git\app\packages\inspector\package.json'
    errno: -4058, code: 'ENOENT', syscall: 'open'
Exited with code 1
error: script "build" exited with code 1

Note the doubled drive prefix F:\F:\.

Root cause

packages/inspector/build.mjs:8:

const at = (path) => new URL(path, import.meta.url).pathname;

On Windows, URL#pathname for a file:///F:/... URL is /F:/... — a POSIX-style, drive-letter-in-path string. fs.readFileSync("/F:/...") resolves against the current drive (F:), producing F:\F:\..., which does not exist.

Everywhere else in the repo this is done correctly with fileURLToPath() (e.g. packages/producer/scripts/test-classification.mjs, packages/cli/scripts/build-copy.mjs, scripts/rewrite-relative-import-extensions.mjs), which yields F:\... as expected.

at() is used for readFileSync (line 9), all esbuild entryPoints/outfiles (lines 19–44), the tsc -p argument (line 49), copyFileSync (line 51) and rewriteRelativeImportExtensions (line 52) — so the whole script dies on the first read.

Impact

The root build script is an && chain:

... && bun run --filter '@hyperframes/{engine,producer,player,studio,shader-transitions,aws-lambda,gcp-cloud-run,sdk,inspector}' build && bun run --filter '@hyperframes/cli' build && ...

One failing member aborts the chain, so @hyperframes/cli and @hyperframes/sdk-playground never build either — bun run build is simply broken on Windows for any fresh clone.

Repro

Windows + Node:

git clone https://github.com/heygen-com/hyperframes.git
cd hyperframes
bun install
bun run build

(The failure is deterministic — no race, no network involved.)

Suggested fix

import { fileURLToPath } from "node:url";
const at = (path) => fileURLToPath(new URL(path, import.meta.url));

This matches the convention used by the rest of the repo and is a no-op on POSIX.

Environment

  • OS: Windows 10/11, repo at origin/main @ b46ebedea
  • Node v24.18.0, bun via bun run build
  • Discovered while a launcher script (git clone + bun install + bun run build) reproduced it end to end
Ngôn ngữ chính
TypeScript
Star
54.1k
Fork
4.9k
Merge trung bình
9 giờ 4 phút
Pull request đã merge (30 ngày)
662

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của heygen-com/hyperframes

Tất cả issue của heygen-com/hyperframes

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.