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

build: tsdown vendor alias uses URL.pathname, which breaks pnpm build on Windows

Aperta Adatta ai principianti
#3,353 0 commenti 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
node.js, typescript
Ambito
build-system

Direzione di ricerca

Il problema è nell'espressione .pathname in tsdown.config.ts, dove l'alias vendor per '@limrun/xdelta3-wasm' viene costruito da new URL(..., import.meta.url).pathname. Sostituiscila con fileURLToPath di node:url, come propone l'issue. È completato quando pnpm build termina su Windows e l'alias si risolve in src/vendor/limrun-delta-sync-omitted.ts.

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

Descrizione

Problem

pnpm build fails on a Windows host:

Could not resolve '@limrun/xdelta3-wasm' ... Matched alias not found

tsdown.config.ts builds the vendor-alias target with new URL(..., import.meta.url).pathname, which yields a POSIX-shaped path on Windows:

'@limrun/xdelta3-wasm': new URL('./src/vendor/limrun-delta-sync-omitted.ts', import.meta.url)
  .pathname,

For file:///C:/.../src/vendor/limrun-delta-sync-omitted.ts, .pathname returns /C:/.../src/vendor/limrun-delta-sync-omitted.ts — a path with a leading slash before the drive letter, which no resolver can match.

Scope

Build-time only, for someone building from source on Windows. It does not affect running a published package, since releases are built on the Linux lanes.

Pre-existing, not introduced by any currently open PR. Present on main and on a7821ef58 (fix/windows-daemon-start-3291), whose diff does not touch tsdown.config.ts. Last change to the file: 0c1ebb33a, feat(provider-webdriver): add TestMu AI device cloud provider (#3118).

Fix

Use fileURLToPath from node:url:

import { fileURLToPath } from 'node:url';

'@limrun/xdelta3-wasm': fileURLToPath(new URL('./src/vendor/limrun-delta-sync-omitted.ts', import.meta.url)),

The reporter confirmed the build completes with that change, and ran the full native Windows checklist on top of it.

Found by

pai-scaffolde while building this head natively on Windows 11 — evidence at https://github.com/callstack/agent-device/pull/3330#issuecomment-6084583110. They offered to open a PR for it.

Lingua principale
TypeScript
Stelle
4.9k
Fork
328
Merge medio
11h 49m
PR unite (30g)
585

Preparare l'ambiente

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 callstack/agent-device

Tutte le issue di callstack/agent-device

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.