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
When I navigate to a TS file in VS Code, e.g. ./src/main.ts, I get errors: Cannot find module 'helpers/functions'
I expected this to work because VS Code would find the ./tsconfig.json in the parent/root directory, and this references ./tsconfig-src.json (the TS project which includes the file I'm looking at: ./src/main.ts).
I understand I could workaround this by moving ./tsconfig-src.json into the ./src/ folder at ./src/tsconfig.json, but I believe that shouldn't be necessary.
…eferenced by one of the project references (#37239)
* Add test where file from referenced project of solution belongs to inferred project instead of referenced project
* Try to find project from project references if the default config project is solution
Fixes#36708
* Add test to verify the correct collection of projects
* Handle when default config project is indirectly referenced in the solution
* Include public API tests in unittests
* Make sure default project for script info is calculated correctly
* Handle reload projects
* Ensure to load solution project tree when project is referenced by solution
* Find all refs when the file is referenced via d.ts
* Some comments per feedback
* Fix typo
TypeScript Version: 3.7.5, 3.8.1-rc
Note: this was originally posted to microsoft/vscode#80423. I was told there that #30823 would fix this.
#30823 was apparently fixed by #33287, however this issue still remains.
Steps to Reproduce:
./tsconfig-src.json
:./tsconfig.json
:./src/main.ts
:./src/helpers/functions.ts
:When I run
tsc --build
, it builds with no errors.When I navigate to a TS file in VS Code, e.g.
./src/main.ts
, I get errors:Cannot find module 'helpers/functions'
I expected this to work because VS Code would find the
./tsconfig.json
in the parent/root directory, and this references./tsconfig-src.json
(the TS project which includes the file I'm looking at:./src/main.ts
).Repo including the above test case: https://github.com/OliverJAsh/unsplash-ts-project-references
I understand I could workaround this by moving
./tsconfig-src.json
into the./src/
folder at./src/tsconfig.json
, but I believe that shouldn't be necessary.What's more, in my real world application the
./tsconfig-src.json
includes files in multiple root folders (./src/
,./client/
,./server/
), not just./src/
, so this workaround wouldn't help in that case. For an example, see https://github.com/OliverJAsh/unsplash-ts-project-references/tree/bad-workaround.Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: