Project references: TS server does not find correct project #56959
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
π Search Terms
π Version & Regression Information
β― Playground Link
No response
π» Code
Full reduced test case: https://github.com/OliverJAsh/ts-project-references-nested
Contents inlined below.
tsconfig.json
:app/tsconfig.json
:app/Component-demos.ts
:demos/tsconfig.json
:demos/helpers.ts
:π Actual behavior
When I run
tsc --build --verbose tsconfig.json
, there are no errors, but when I open my editor (VS Code) and open the fileapp/Component-demos.ts
, I see errors:π Expected behavior
No errors inside my editor.
Additional information about the issue
When
app/Component-demos.ts
is opened, I believe TypeScript traverses parent file directories searching for atsconfig.json
file, and it stops at the first file it finds which in this case isapp/tsconfig.json
. This TS project does not include the fileapp/Component-demos.ts
, so I believe TypeScript should continue traversing parent file directories to search for anothertsconfig.json
that does include the file. In this case, we want TypeScript to discover the roottsconfig.json
.The text was updated successfully, but these errors were encountered: