Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#5,863 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js, typescript

Direzione di ricerca

Leggi packages/inspector/build.mjs e confronta il suo helper per i percorsi con gli esempi del repository indicati nell’issue. Riproduci il problema con bun run build su Windows, poi conferma che la build del pacchetto riesce dopo che l’helper usa fileURLToPath. Il lavoro è completato quando il prefisso del drive duplicato è scomparso e la build root può proseguire oltre il pacchetto inspector.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
54.1k
Fork
4.9k
Merge medio
9h 4m
PR unite (30g)
662

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di heygen-com/hyperframes

Tutte le issue di heygen-com/hyperframes

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.