Closed
Description
Bug Report
Sorry I cannot give a small reproduction because I believe it is related to big projects.
When I'm working on big composited projects, when I added or remove a file, tsc will not be able to compile it correctly, and I need to restart tsc.
Add a new file
packages/mask/src/setup.ui.0.ts:4:19 - error TS6307: File 'packages/mask/src/new-file.ts' is not listed within the file list of project 'packages/mask/src/tsconfig.json'. Projects must list all files or use an 'include' pattern.
Config of this project:
"compilerOptions": {
"rootDir": "./",
"lib": ["ES2021"]
},
"include": ["./", "./**/*.json"],
Removing a file
error TS6053: File 'packages/mask/src/utils/shadow-root/renderInShadowRoot.tsx' not found.
The file is in the program because:
Matched by include pattern './' in 'packages/mask/src/tsconfig.json'
packages/mask/src/tsconfig.json:10:15
10 "include": ["./", "./**/*.json"],
~~~~
File is matched by include pattern specified here.
Once any of these error occurs, I have to restart TSC to get new type check results.
🔎 Search Terms
add remove restart tsc incremental
🕗 Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______