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

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

オープン 初心者向け
#5,863 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

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

調査の方向性

packages/inspector/build.mjsを読み、そのパスヘルパーをissueで挙げられているリポジトリの例と比較してください。Windowsでbun run buildを実行して再現し、ヘルパーがfileURLToPathを使うようになった後にパッケージのビルドが成功することを確認してください。ドライブプレフィックスの重複がなくなり、rootビルドがinspectorパッケージより先に進める状態になれば完了です。

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

説明

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
主要言語
TypeScript
スター
54.1k
フォーク
4.9k
平均マージ
9時間 3分
マージ済み PR(30日)
670

環境構築

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

はじめの一歩

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

heygen-com/hyperframes のほかの issue

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

似ている issue

TypeScript の issue をもっと見る

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

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