angular-query: migrate-from-experimental schematic crashes with 'Path ... is a file' on a .js subpath import
メンテナーはふだん 1 日以内に返信
@benjavicente がすでに取り組んでいます。
2026年10月16日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- angular, typescript
- 領域
- devtools
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 50.4k
- フォーク
- 4.3k
- 平均マージ
- 12時間 18分
- マージ済み PR(30日)
- 488
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/query のほかの issue
-
QueryClient.isFetching and useIsFetching accept a fetchStatus filter and ignore it対応中かも @Apu-Emdad が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)再び着手できるかも @LeonxLJX が 45 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TanStack/query#11358 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
solid-query 6.0.0-rc.5: onCacheEvent throws NotReadyError during a Solid 2 (rc.14+) transition landing対応中かも @UzumakiODZ が 4 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
TanStack/query#12031 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Explicit gcTime schedules a GC timer during SSR, retaining the whole render in memory対応中かも @AdzerKI が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
TanStack/query#12025 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
restoreQueries and persisterGc throw on malformed persisted entries対応中かも @VGontier-cmd が 13 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
[测试] 等待仓库加载后再记录多仓库排序基线対応中かも @myot233 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
area:arcade p3-medium ready-for-agent testing type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fderuiter/deruiter.dev#2369 ·
メンテナーはふだん 1 日以内に返信
-
area:devenv origin:agent type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
overengineeringstudio/effect-utils#1949 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ccch1mneyyy/dsh-TUI#1631 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#507 ·
メンテナーはふだん 1 日以内に返信