angular-query: migrate-from-experimental schematic crashes with 'Path ... is a file' on a .js subpath import
Mantenedores costumam responder em até 1 dia
@benjavicente já está trabalhando nisso.
Desde 16/10/2026.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- angular, typescript
- Domínio
- devtools
Direção de pesquisa
The crash comes from the compiler host built in configuredSources() in packages/angular-query/schematics/migrate-from-experimental/workspace.ts, where directoryExists calls tree.getDir(path) on paths that can be files. Read that host and how the devkit Tree reports files versus directories, then reproduce with the linked repro and a source importing a .js subpath such as @noble/hashes/sha3.js. Done means the dry run lists the expected UPDATE entries instead of throwing, with a regression test in the schematic's test suite. The reporter says they plan to open the PR themselves, so confirm with them before starting.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the bug
The migrate-from-experimental schematic in @tanstack/[email protected] aborts before migrating anything when a project source imports a package subpath that names a file, such as import { sha3_256 } from '@noble/hashes/sha3.js':
Path "/node_modules/@noble/hashes/sha3.js" is a file.
The cause is the compiler host built in configuredSources() (packages/angular-query/schematics/migrate-from-experimental/workspace.ts). Its directoryExists calls tree.getDir(path) directly. TypeScript's module resolution probes candidate paths with directoryExists, and some of them are files. The devkit Tree.getDir() then throws PathIsFileException rather than reporting that no directory exists.
Your minimal, reproducible example
https://github.com/imaksp/tanstack-angular-query-migrate-schematic-repro
Steps to reproduce
- Clone the repro and run
pnpm install. - Run
pnpm exec ng generate @tanstack/angular-query:migrate-from-experimental --dry-run. - See
Path "/node_modules/@noble/hashes/sha3.js" is a file.
It also reproduces with an npm-style flat layout (pnpm install --config.node-linker=hoisted). Removing the @noble/hashes/sha3.js import makes the dry run succeed.
Expected behavior
The schematic migrates the workspace: the dry run lists UPDATE src/main.ts and UPDATE package.json. Instead it throws, and none of the project's files are migrated. In a real workspace, every file is skipped as soon as one source imports such a subpath.
How often does this bug happen?
Every time
Platform
- OS: macOS 26
- Node: 26.8.2
- pnpm: 12.9.1
- Angular CLI: 22.2.1
Tanstack Query adapter
angular-query
TanStack Query version
5.0.0-rc.3
TypeScript version
6.0.3
Additional context
Making directoryExists return false for a path that is a file fixes it. tree.exists() is true only for files:
host.directoryExists = (path) => {
if (tree.exists(path)) return false
const directory = tree.getDir(path)
return directory.subfiles.length > 0 || directory.subdirs.length > 0
}
With that change the repro's dry run succeeds. I'll open a PR with the fix and a regression test.
- Linguagem predominante
- TypeScript
- Estrelas
- 50.4k
- Forks
- 4.2k
- Merge médio
- 8h 51min
- PRs com merge (30d)
- 432
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um 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 TanStack/query
-
QueryClient.isFetching and useIsFetching accept a fetchStatus filter and ignore itTalvez já em andamento @Apu-Emdad assumiu há 2 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)Talvez livre de novo @LeonxLJX assumiu há 43 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
TanStack/query#11358 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
solid-query: switching the queryClient accessor strands the new client's cache (subscription stays on the old observer)Talvez já em andamento @MaNaN1803 assumiu há 85 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
TanStack/query#11106 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
solid-query 6.0.0-rc.5: onCacheEvent throws NotReadyError during a Solid 2 (rc.14+) transition landingTalvez já em andamento @UzumakiODZ assumiu há 1 dia. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 28/100
TanStack/query#12031 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Explicit gcTime schedules a GC timer during SSR, retaining the whole render in memoryTalvez já em andamento @AdzerKI assumiu há 2 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 25/100
TanStack/query#12025 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de TanStack/query
Issues semelhantes
-
Endpoint links in the tag operations list are below the 24px target sizeTalvez já em andamento @AdzerKI assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
ai-driven-qa bug Minor
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
linagora/twake-tasks#435 ·
Mantenedores costumam responder em até 1 dia
-
bug domain: database priority: p1 Stellar Wave
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
StellarState/SS-backend#632 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)Talvez já em andamento @O1sumitkumar assumiu hoje. Abertabug good first issue help wanted python
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
`cf complete zsh >> .zshrc` fails on vanilla zshTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
cloudflare/cf#340 ·
Mantenedores costumam responder em até 1 dia