You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npx tsc -w is triggering itself after each build #64037
It was wgo, I had this thing https://github.com/bokwoon95/wgo watching for changes to my Go programs. Once I stopped these it started working. Maybe you want to look in to that, because I don't think they should be interfering with each other. I don't know what wgo is doing but if it is causing events that trigger tsc needlessly that wrong?
No, I don't think anything is wrong here. wgo is updating a file in the same directory regardless of any changes, I suspect this is triggering tsc, which is understandable.
How can I get it to ignore this file? It's a *.wasm file
This does not happen if I create a new file at the root, or create a new file in the newly created directory, or delete the newly created directory.
For example
/tsconfig.json
/bogus/ <- new directory, triggers compilation despite not being included in tsconfigs
deleting it does not trigger compilation
/bogus/bogus.ts <- new file, no issues
/bogus.ts <- new file, no issues
I should add that TS7's watch mode does not offer any way afaict to log which file/folder triggered a re-run.
I have a repro below on 7.0.2 (macOS, fsevents backend).
I'm pretty sure it's the same issue as the original report: in watch mode, any write under a recursive include root triggers a rebuild. exclude is ignored.
Expected: no rebuild for writes under excluded directories. 6.0.3 with the same project compiles once at startup and doesn't react to build/ writes.
Activity
msab-john commentedon Aug 26, 2026
Ha, I figured out what it was!
It was wgo, I had this thing https://github.com/bokwoon95/wgo watching for changes to my Go programs. Once I stopped these it started working. Maybe you want to look in to that, because I don't think they should be interfering with each other. I don't know what wgo is doing but if it is causing events that trigger tsc needlessly that wrong?
msab-john commentedon Aug 26, 2026
No, I don't think anything is wrong here. wgo is updating a file in the same directory regardless of any changes, I suspect this is triggering tsc, which is understandable.
How can I get it to ignore this file? It's a *.wasm file
This doesn't seem to the trick
{ "compilerOptions": { "types": ["node"], "jsx": "react-jsx", "jsxImportSource": "preact", "module": "nodenext", "moduleResolution": "nodenext", "target": "esnext", "strict": true }, "include": ["**/*.ts"], "exclude": ["**/*.js", "**/*.js.map", "**/*.d.ts", "**/*.wasm"], "watchOptions": { "excludeFiles": ["**/*.js", "**/*.js.map", "**/*.d.ts", "**/*.wasm"], "excludeDirectories": ["**/node_modules"] } }RyanCavanaugh commentedon Aug 26, 2026
We need a concrete repro in order to investigate
msab-john commentedon Aug 27, 2026
I'll see if I can make a small and simple one...
nstepien commentedon Sep 3, 2026
Experiencing the same issue.
Very simple repro:
tsc --watch --preserveWatchOutputThis does not happen if I create a new file at the root, or create a new file in the newly created directory, or delete the newly created directory.
For example
I should add that TS7's watch mode does not offer any way afaict to log which file/folder triggered a re-run.
njmarsh commentedon Oct 5, 2026
I have a repro below on 7.0.2 (macOS, fsevents backend).
I'm pretty sure it's the same issue as the original report: in watch mode, any write under a recursive
includeroot triggers a rebuild.excludeis ignored.Expected: no rebuild for writes under excluded directories. 6.0.3 with the same project compiles once at startup and doesn't react to build/ writes.
Running
TS_WATCH_DEBUG=1 tsc --watch --preserveWatchOutputproduces:Further updates to files under
repro/buildproduce similar rebuilds, despite the exclude statement.For anyone else debugging this: TS_WATCH_DEBUG=1 logs the event paths that trigger each rebuild.