[Bug]: On Windows, `vp run dev` restarts the server repeatedly because watched `node_modules` folders report access as changes
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 56/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
Start by reading the dev script configuration and the change from #21065 that added --watch-path=../../packages; then inspect how the watcher treats packages/*/node_modules on Windows and Linux. Reproduce with vp run dev on Windows and check that startup reaches Listening on without restarting for access-time events. Verify Linux still does not watch loaded files under node_modules/.pnpm.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Area
apps/server, Build, CI, or release tooling
Steps to reproduce
- On Windows, run
vp run devfrom a clean checkout ofmain. - Watch the server output before the first
Listening online.
The server restarts several times during startup, each time for a directory under packages/*/node_modules that nothing wrote to:
Change detected in 'D:\\Projects\\t3code\\packages\\source-control-gitlab\\node_modules\\@t3tools'
Restarting 'src/bin.ts'
Change detected in 'D:\\Projects\\t3code\\packages\\shared\\node_modules\\@t3tools'
Restarting 'src/bin.ts'
Change detected in 'D:\\Projects\\t3code\\packages\\provider-core\\node_modules\\@t3tools'
Restarting 'src/bin.ts'
... 9 restarts in total
It can also restart later with nothing changed, which drops the browser's connection ("is reconnecting").
Expected behavior
The dev server starts once and restarts only when a watched source file changes.
Actual behavior
Since #21065 the server runs with --watch-path=../../packages, so Node's recursive watcher also covers every packages/*/node_modules directory. None of the reported directories were modified.
I ran a separate recursive fs.watch on packages/ during one vp run dev startup. It logged 32 events, all change on packages/*/node_modules directories (mostly the @t3tools scope). For each one, mtime and ctime were about 2 hours old (clone time) and atime was under 1 second old. So these look like NTFS last-access updates from the server resolving imports through those directories, reported by Windows as changes. Each restarted server appears to touch more of them, which triggers the next restart. git status was clean throughout.
A fix would need to keep #21065's Linux behavior: not watching loaded files under node_modules/.pnpm.
Impact
Frequent failure
Version or commit
Tested on main at 4f0b74e190. The dev script is unchanged on main at 5badea5b45.
Environment
Windows 11 build 26300 x64, NTFS (fsutil behavior query disablelastaccess → 2, System Managed, last-access updates enabled), Node 26.12.1 from vp, vp 1.5.0.
Logs or stack traces
Two startups: 4 restarts before the first Listening on, then 9 restarts and 51 s from vp run dev to Listening on. In the first run, a later Change detected in '...\\packages\\secret-provider-core\\tsconfig.json' (unmodified, mtime from clone time) restarted a running server and the open page showed "reconnecting".
- Lingua principale
- TypeScript
- Stelle
- 24.8k
- Fork
- 6.4k
- Merge medio
- 10h 56m
- PR unite (30g)
- 226
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pingdotgg/t3code
-
[Bug]: request_secret file delivery has no trailing newline, and the tool text does not say soForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Changing the sidebar project filter collapses an expanded Settled shelf back to 10 threadsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pingdotgg/t3code#34291 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pingdotgg/t3code
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
lingdojo/kana-dojo#33947 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
paperclipai/paperclip#20942 ·
I maintainer di solito rispondono entro 1 giorno
-
area: documentation good first issue package: rule-data status: accepting prs
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
mastra-ai/mastra#30109 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno