angular-query: migrate-from-experimental schematic crashes with 'Path ... is a file' on a .js subpath import
Los mantenedores suelen responder en 1 día
@benjavicente ya está trabajando en esto.
Desde el 16/10/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- angular, typescript
- Área
- devtools
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 50.4k
- Forks
- 4.3k
- Merge medio
- 13 h 35 min
- PR fusionados (30 d)
- 442
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/query
-
QueryClient.isFetching and useIsFetching accept a fetchStatus filter and ignore itPosiblemente ocupada @Apu-Emdad la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)Quizá libre de nuevo @LeonxLJX la tomó hace 44 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
TanStack/query#11358 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
solid-query 6.0.0-rc.5: onCacheEvent throws NotReadyError during a Solid 2 (rc.14+) transition landingPosiblemente ocupada @UzumakiODZ la tomó hace 2 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
TanStack/query#12031 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Explicit gcTime schedules a GC timer during SSR, retaining the whole render in memoryPosiblemente ocupada @AdzerKI la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
TanStack/query#12025 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
restoreQueries and persisterGc throw on malformed persisted entriesPosiblemente ocupada @VGontier-cmd la tomó hace 11 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/query
Issues similares
-
backend priority:P3 privacy-fix
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[Bug]: 【优化】对话消息底部增加发送时间展示Abiertobug desktop v3 windows
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
esengine/DeepSeek-Reasonix#13697 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:security documentation effort:S priority:P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
app:web meta:ops
Dificultad 2/5 Medio día Aptitud para principiantes 78/100
osu-tournament-rating/otr#1113 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100