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

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

Đang mở Phù hợp với người mới
#3,353 0 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
Công nghệ
node.js, typescript
Lĩnh vực
build-system

Hướng nghiên cứu

Lỗi nằm ở biểu thức .pathname trong tsdown.config.ts, nơi alias vendor cho '@limrun/xdelta3-wasm' được tạo từ new URL(..., import.meta.url).pathname. Hãy thay thế bằng fileURLToPath từ node:url, như issue đề xuất. Hoàn thành khi pnpm build chạy xong trên Windows và alias được phân giải thành src/vendor/limrun-delta-sync-omitted.ts.

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

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
4.9k
Fork
328
Merge trung bình
11 giờ 49 phút
Pull request đã merge (30 ngày)
585

Chuẩn bị môi trường

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

Tất cả issue của callstack/agent-device

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.