build: tsdown vendor alias uses URL.pathname, which breaks pnpm build on Windows
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 1/5
- Tempo estimado
- Menos de uma hora
- Facilidade para iniciantes
- 88/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- node.js, typescript
- Domínio
- build-system
Direção de pesquisa
A falha está na expressão .pathname em tsdown.config.ts, onde o alias de vendor para '@limrun/xdelta3-wasm' é construído a partir de new URL(..., import.meta.url).pathname. Substitua-a por fileURLToPath de node:url, como sugere a issue. Está concluído quando pnpm build termina no Windows e o alias resolve para src/vendor/limrun-delta-sync-omitted.ts.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 5.2k
- Forks
- 359
- Merge médio
- 13h 31min
- PRs com merge (30d)
- 664
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de callstack/agent-device
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed readTalvez já em andamento @pcbeingused333 assumiu há 2 dias. Abertabug ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
callstack/agent-device#4018 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
callstack/agent-device#1869 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 18/100
callstack/agent-device#4179 ·
Mantenedores costumam responder em até 1 dia
-
Daemon: refuse leased requests that name no session at request admissionTalvez já em andamento @airowe assumiu hoje. Abertabug ready-for-agent
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
callstack/agent-device#4171 ·
Mantenedores costumam responder em até 1 dia
-
enhancement needs-triage
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
callstack/agent-device#4162 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de callstack/agent-device
Issues semelhantes
-
area: cli bug flake ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
gazetta-studio/gazetta-studio#1772 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
microsoft/playwright#43875 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
documentation good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
calagopus/panel#285 · 1 comentário ·
Mantenedores costumam responder em até 1 dia